[英]display-shell-version C-x C-v for zsh
In bash, pressing Cx
Cv
outputs the version of the shell, eg 在bash中,按
Cx
Cv
输出外壳的版本,例如
$ # pressing C-x C-v here
GNU bash, version 4.4.12(1)-release (x86_64-unknown-linux-gnu)
In zsh, nothing happens. 在zsh中,什么也没有发生。 The same applies to other "standard" bash keycombos like
Cx
Ce
to start the default $EDITOR
. 这同样适用于其他“标准” bash键组合,例如
Cx
Ce
以启动默认的$EDITOR
。
% # pressing C-x C-v here - nothing happens
% zsh --version
zsh 5.3.1 (x86_64-unknown-linux-gnu)
% # ^ I want to the above line output on C-x C-v
What is the easiest way to enable these bash keycombos for zsh? 为zsh启用这些bash键组合最简单的方法是什么?
in zshrc
file add: 在
zshrc
文件中添加:
autoload -U edit-command-line
zle -N edit-command-line
bindkey '\C-x\C-e' edit-command-line
now u can start editor. 现在您可以启动编辑器了。 in
bash
for show version there is display-shell-version
: 在
bash
显示版本中,有display-shell-version
:
display-shell-version (C-x C-v)
Display version information about the current instance of bash.
in zsh
there is not display-shell-version, but u can create your function and after make binding 在
zsh
中没有display-shell-version,但是您可以创建函数并在进行绑定后
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.