2017-07-02 53 views
0

在bash中,按C-xC-v輸出shell的版本,例如,display-shell-version C-x for zsh

$ # pressing C-x C-v here 
GNU bash, version 4.4.12(1)-release (x86_64-unknown-linux-gnu) 

在zsh中,沒有任何反應。這同樣適用於其他「標準」bash鍵組合,如C-xC-e以啓動默認$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 

爲zsh啓用這些bash keycombos的最簡單方法是什麼?

回答

1
zshrc文件

添加:

autoload -U edit-command-line 
zle -N edit-command-line 
bindkey '\C-x\C-e' edit-command-line 

現在ü可以開始編輯。 在bash作秀版本有display-shell-version

display-shell-version (C-x C-v) 
       Display version information about the current instance of bash. 

zsh沒有顯示外殼版本,但你可以創建你的函數,並結合

化妝後