diff options
author | Alan Pearce | 2024-04-01 14:29:26 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-01 14:29:26 +0200 |
commit | f33f803371569bbaf527190b5cb7ab038bb1fe60 (patch) | |
tree | fa89e4e21d5c617df1c36650a15b4bf8e3ebc0ab /user | |
parent | b5e488c04c53845801239590552c8187ce954c4b (diff) | |
download | nixfiles-f33f803371569bbaf527190b5cb7ab038bb1fe60.tar.lz nixfiles-f33f803371569bbaf527190b5cb7ab038bb1fe60.tar.zst nixfiles-f33f803371569bbaf527190b5cb7ab038bb1fe60.zip |
fish: add !! shell alias for last history command
Diffstat (limited to 'user')
-rw-r--r-- | user/settings/fish.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/user/settings/fish.nix b/user/settings/fish.nix index c00e4fd1..8ed80e3e 100644 --- a/user/settings/fish.nix +++ b/user/settings/fish.nix @@ -42,8 +42,15 @@ 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" = { |