Skip to content

Instantly share code, notes, and snippets.

@adisbladis
Created August 28, 2014 19:30
Show Gist options
  • Save adisbladis/663cdcac7d4830598244 to your computer and use it in GitHub Desktop.
Save adisbladis/663cdcac7d4830598244 to your computer and use it in GitHub Desktop.
function __fish_save_commandline --description 'Save commandline to a buffer, if commandline is empty paste buffer'
if test (commandline)
set -g __fish_commandline_pos (commandline -C)
set -g __fish_commandline_str (commandline)
commandline ''
else
commandline $__fish_commandline_str
commandline -C $__fish_commandline_pos
end
end
bind \eq __fish_save_commandline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment