Add viz_cmd_usage_zsh_history.sh
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 16 Dec 2019 21:07:13 +0000 (16:07 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 16 Dec 2019 21:07:13 +0000 (16:07 -0500)
viz_cmd_usage_zsh_history.sh [new file with mode: 0644]

diff --git a/viz_cmd_usage_zsh_history.sh b/viz_cmd_usage_zsh_history.sh
new file mode 100644 (file)
index 0000000..909495c
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+awk -F';' '{sub("^" $1 ";", ""); print}' ~/.zsh_history | awk '{print $1}' | awk '{curr = $1; links[NR, prev] = curr; prev = curr} END {printf "digraph G {"; for (node in links) {split(node, n, SUBSEP); printf "\"%s\" -> \"%s\"\n", n[2], links[node]}; printf "}\n"}' | neato -T png | feh -
This page took 0.015011 seconds and 4 git commands to generate.