diff --git a/README.md b/README.md index d44d1cd..8d02367 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ 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. +An example plugin for fish is provided in hellpipe.fish. ## Example diff --git a/hellpipe.fish b/hellpipe.fish new file mode 100644 index 0000000..105791d --- /dev/null +++ b/hellpipe.fish @@ -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