add example fish plugin

This commit is contained in:
NotAFile 2021-09-29 18:59:26 +02:00
parent bd43832eee
commit fd2095c86e
2 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,7 @@
wip: generate python scripts from (s)hell pipelines wip: generate python scripts from (s)hell pipelines
Intended to be used with a shell plugin to make those oneliners that get out of hand more manageable. Intended to be used with a shell plugin to make those oneliners that get out of hand more manageable.
An example plugin for fish is provided in hellpipe.fish.
## Example ## Example

14
hellpipe.fish Normal file
View File

@ -0,0 +1,14 @@
# bind to a key combination of your choice, e.g. for alt-z
# bind --user \ez __hellpipeify
function __hellpipeify
commandline -j | python3 -m hellpipe.main - > temp.py
or return 1
__fish_disable_bracketed_paste
$EDITOR temp.py
or return 1
__fish_enable_bracketed_paste
commandline -r -j -- "python3 temp.py"
commandline -C 999999
commandline -f repaint
end