Skip to content

Instantly share code, notes, and snippets.

@jonatas
Created December 19, 2016 17:10
Show Gist options
  • Select an option

  • Save jonatas/940637e6c6fb7007a4b177e9138c1af4 to your computer and use it in GitHub Desktop.

Select an option

Save jonatas/940637e6c6fb7007a4b177e9138c1af4 to your computer and use it in GitHub Desktop.
function fish_user_key_bindings
bind ! bind_bang
bind '$' bind_dollar
end
function bind_bang
switch (commandline -t)[-1]
case "!"
commandline -t $history[1]; commandline -f repaint
case "*"
commandline -i !
end
end
function bind_dollar
switch (commandline -t)[-1]
case "!"
commandline -t ""
commandline -f history-token-search-backward
case "*"
commandline -i '$'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment