Add viz_cmd_usage_zsh_history.sh
[snip.git] / viz_cmd_usage_zsh_history.sh
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.01989 seconds and 4 git commands to generate.