summary refs log tree commit diff stats
path: root/user/settings
diff options
context:
space:
mode:
authorAlan Pearce2023-08-24 06:03:14 +0200
committerAlan Pearce2023-08-24 06:03:14 +0200
commit8dca85d4bc8b82a586f8fdbb7bc7b7a0d7d4e9e8 (patch)
tree2adfa0cff09176dfee7d87a13fedf63c69ecdc1b /user/settings
parent22a921a71ee318221a61a6bfb72bb7015239fa9e (diff)
downloadnixfiles-8dca85d4bc8b82a586f8fdbb7bc7b7a0d7d4e9e8.tar.lz
nixfiles-8dca85d4bc8b82a586f8fdbb7bc7b7a0d7d4e9e8.tar.zst
nixfiles-8dca85d4bc8b82a586f8fdbb7bc7b7a0d7d4e9e8.zip
shell: translate history statistic aliases to fish
Diffstat (limited to 'user/settings')
-rw-r--r--user/settings/fish.nix4
-rw-r--r--user/settings/shell.nix2
2 files changed, 5 insertions, 1 deletions
diff --git a/user/settings/fish.nix b/user/settings/fish.nix
index 7dee70b4..4bee970f 100644
--- a/user/settings/fish.nix
+++ b/user/settings/fish.nix
@@ -42,6 +42,10 @@
         set -x KITTY_SHELL_INTEGRATION no-cursor
       end
     '';
+    shellAliases = {
+      hist-freq-lines = "history | sort | uniq -c | sort -gr | head -n100 | less";
+      hist-freq-commands = "history | cut -d' ' -f 1 | sort | uniq -c | sort -gr | head -n100 | less";
+    };
     functions = {
       ds = "du -hd1 $argv[1] | sort -h";
     };
diff --git a/user/settings/shell.nix b/user/settings/shell.nix
index 637ad6fc..cc827427 100644
--- a/user/settings/shell.nix
+++ b/user/settings/shell.nix
@@ -36,7 +36,7 @@ in
       xhs = "xh --default-scheme https";
 
       hist-freq-lines = "fc -l -10000 | cut -d' ' -f4- | sort | uniq -c | sort -gr | head -n100 | less";
-      hist-freq-commands = "fc -l -10000 | cut -d' ' -f4 | sort | uniq -c | sort -gr | head -n10 | less";
+      hist-freq-commands = "fc -l -10000 | cut -d' ' -f4 | sort | uniq -c | sort -gr | head -n100 | less";
       wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";
 
       # Enable the following commands to support aliases.