2 ms·
Adding this to your config.fish will give you !! and !$ in fish function bind_bang switch (commandline -t)[-1] case "!"
by lbhdc 6y ago
Adding this to your config.fish will give you !! and !$ in fish
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
function fish_user_key_bindings
bind ! bind_bang
bind '$' bind_dollar
end