在默认 (emacs) 模式下使用 bash 当我点击Esc,? ..
$ echo hello
hello
$ hello # I hit `<ESC>.` to insert this
Run Code Online (Sandbox Code Playgroud)
请注意hello
,当我点击时插入的单词前没有空格Esc,?..
如果我切换到 vi 模式并进行配置,.
我会得到一个前导空格:
$ set -o vi
$ bind -m vi-command ".":yank-last-arg
$ echo hello
hello
$ hello # I hit `<ESC>.` to insert this. Note the leading space.
Run Code Online (Sandbox Code Playgroud)
有没有办法配置 bash/readline 来避免这个前导空间?