fish: add !! shell alias for last history command
Alan Pearce alan@alanpearce.eu
Mon, 01 Apr 2024 14:29:26 +0200
1 files changed, 7 insertions(+), 0 deletions(-)
jump to
M user/settings/fish.nix → user/settings/fish.nix
@@ -42,8 +42,15 @@ shellAliases = { hist-freq-lines = lib.mkForce "history | sort | uniq -c | sort -gr | head -n100 | less"; hist-freq-commands = lib.mkForce "history | cut -d' ' -f 1 | sort | uniq -c | sort -gr | head -n100 | less"; }; + shellAbbrs = { + "!!" = { + position = "anywhere"; + function = "last_history_item"; + }; + }; functions = { ds = "du -hd1 $argv[1] | sort -h"; + last_history_item = "echo $history[1]"; }; }; xdg.configFile."fish/completions" = {