Skip to content

Instantly share code, notes, and snippets.

@faja
Created January 20, 2014 09:58
Show Gist options
  • Select an option

  • Save faja/8517649 to your computer and use it in GitHub Desktop.

Select an option

Save faja/8517649 to your computer and use it in GitHub Desktop.
bash: paste last line from previous command output
get_last_line() { READLINE_LINE+=$(fc -s | tail -n1); READLINE_POINT=$;}
bind -x '"\C-x\C-k":get_last_line'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment