From bd3083be8b43cb2e2e10a7456551cfc5fb0fde11 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 24 Aug 2023 21:07:43 +0200 Subject: fish: port function to get most common subcommands of given command --- user/settings/fish/functions/history-frequent-subcommands.fish | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 user/settings/fish/functions/history-frequent-subcommands.fish (limited to 'user/settings/fish/functions') 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 -- cgit 1.4.1