Skip to content

Instantly share code, notes, and snippets.

@viktorkelemen
Created November 1, 2012 06:18
Show Gist options
  • Select an option

  • Save viktorkelemen/3992144 to your computer and use it in GitHub Desktop.

Select an option

Save viktorkelemen/3992144 to your computer and use it in GitHub Desktop.
Retrieving the results of 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment