Added Ctrl-x,Ctrl-l to zsh to insert output of last command

This commit is contained in:
yan
2012-04-19 17:55:41 -07:00
parent 0ebd0693a1
commit 2ad786a41b
3 changed files with 9 additions and 0 deletions

7
zsh/last-command.zsh Normal file
View File

@@ -0,0 +1,7 @@
# Use Ctrl-x,Ctrl-l to get the output of the last command
zmodload -i zsh/parameter
insert-last-command-output() {
LBUFFER+="$(eval $history[$((HISTCMD-1))])"
}
zle -N insert-last-command-output
bindkey "^X^L" insert-last-command-output