On Sat, Mar 30, 2019, at 04:37, Tassilo Horn wrote:
> As a very simple test case not requiring fzf, I tried this:
> 
>   function insert_hello
>       echo -n "Hello"
>   end
>   bind \co insert_hello
> So what am I doing wrong?

The above function sends "Hello" to standard output, it does not insert it into 
the command line.  There is a command called 'commandline' for this purpose.

> Instead of a keybinding, I also tried defining an abbr __ for '(fzf
> --options...)'  but here the problem is that abbrevs expand only when
> they start a command, not when they are in the end or middle of a
> command.

If you want a shortcut that doesn't have to be at the beginning, see 
https://github.com/fish-shell/fish-shell/issues/1963#issuecomment-447554937
and
https://github.com/fish-shell/fish-shell/issues/1963#issuecomment-93775067
and read the entire issue with all the comments to learn more.

> And while we are at the command line editor: is there no "command insert
> mode" where I could check out which editor commands are there and how
> they are named by tab-completing, e.g., what ZSH has bound to M-x.

I don't understand what you are asking (I haven't used zsh).  Try the 'bind' 
command without any arguments or options to see all the key bindings.


_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to