percol icon indicating copy to clipboard operation
percol copied to clipboard

how to add support in bash?

Open redguardtoo opened this issue 12 years ago • 2 comments

as title

redguardtoo avatar Mar 18 '13 23:03 redguardtoo

Actually, percol supports bash, since its core feature doesn't relate to the shell itself.

OK, I guess that you mean features that are achieved by integrating percol and shell's inline-editor tightly, like incremental-history-search. More specifically, such feature requires the shell of the ability to insert shell-command's results into its inline-editor.

zsh has a very rich programmable interface for inline-editor, named zle, and percol uses this interface to modify the contents of inline-editor.

However, as far as I know, bash doesn't have such kind of rich programmable interface, and it seems that bash lacks the required ability mentioned above.

So, in conclusion, I don't know how to add the rich-feature to bash, unfortunately.

mooz avatar Mar 19 '13 15:03 mooz

In case someone still needs this, here is what I use: bind -x '"\C-R": READLINE_LINE=$(history | tac | cut -c 8- | percol --query "${READLINE_LINE}") READLINE_POINT='

noop127 avatar Oct 25 '15 20:10 noop127