summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/settings/fish.nix7
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" = {