summary refs log tree commit diff stats
path: root/user/settings/fish/functions
diff options
context:
space:
mode:
authorAlan Pearce2023-08-24 21:07:43 +0200
committerAlan Pearce2023-08-24 21:08:14 +0200
commitbd3083be8b43cb2e2e10a7456551cfc5fb0fde11 (patch)
tree90a17540d3f320d52f4ae2bc09ba5f3e50f40d12 /user/settings/fish/functions
parent8dca85d4bc8b82a586f8fdbb7bc7b7a0d7d4e9e8 (diff)
downloadnixfiles-bd3083be8b43cb2e2e10a7456551cfc5fb0fde11.tar.lz
nixfiles-bd3083be8b43cb2e2e10a7456551cfc5fb0fde11.tar.zst
nixfiles-bd3083be8b43cb2e2e10a7456551cfc5fb0fde11.zip
fish: port function to get most common subcommands of given command
Diffstat (limited to 'user/settings/fish/functions')
-rw-r--r--user/settings/fish/functions/history-frequent-subcommands.fish3
1 files changed, 3 insertions, 0 deletions
diff --git a/user/settings/fish/functions/history-frequent-subcommands.fish b/user/settings/fish/functions/history-frequent-subcommands.fish
new file mode 100644
index 00000000..2e7040fc
--- /dev/null
+++ b/user/settings/fish/functions/history-frequent-subcommands.fish
@@ -0,0 +1,3 @@
+function history-frequent-subcommands
+    history search --prefix "$argv[1] " --max 10000 | cut -d' ' -f 2 | sort | uniq -c | sort -gr | head -n100 | less
+end