Skip to content

Instantly share code, notes, and snippets.

@kleutzinger
Last active February 27, 2021 08:55
Show Gist options
  • Save kleutzinger/2ad0902f741eb97d5e43ef65b78ed6a7 to your computer and use it in GitHub Desktop.
Save kleutzinger/2ad0902f741eb97d5e43ef65b78ed6a7 to your computer and use it in GitHub Desktop.
The 40 most common fish shell commands run by me from Nov 2020 to Feb 2021
from collections import Counter
from pprint import pprint
seen = Counter()
with open("/home/kevin/.local/share/fish/fish_history") as f:
for i in f.readlines():
if i.startswith("- cmd: "):
words = i.split(" ")
cmd = words[2]
if cmd == "sudo" and len(words) > 3:
cmd = words[3]
seen.update([cmd])
pprint(list(enumerate(seen.most_common(40))))
[(0, ('yay', 978)),
(1, ('cd', 680)),
(2, ('cat', 447)),
(3, ('man', 253)),
(4, ('git', 240)),
(5, ('rm', 236)),
(6, ('nvim', 206)),
(7, ('python', 203)),
(8, ('echo', 139)),
(9, ('ls', 131)),
(10, ('mv', 127)),
(11, ('yadm', 115)),
(12, ('tldr', 104)),
(13, ('yarn', 86)),
(14, ('mkdir', 84)),
(15, ('z', 82)),
(16, ('kitty', 79)),
(17, ('micro', 79)),
(18, ('rg', 77)),
(19, ('nano', 72)),
(20, ('fd', 68)),
(21, ('vlc', 67)),
(22, ('wtf', 60)),
(23, ('cp', 59)),
(24, ('curl', 59)),
(25, ('npm', 58)),
(26, ('function', 55)),
(27, ('deno', 54)),
(28, ('dokku_', 47)),
(29, ('pacman', 42)),
(30, ('set', 42)),
(31, ('killall', 41)),
(32, ('chmod', 38)),
(33, ('functions', 36)),
(34, ('pipenv', 35)),
(35, ('touch', 34)),
(36, ('du', 34)),
(37, ('xclip', 32)),
(38, ('fisher', 30)),
(39, ('hub', 30))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment