Skip to content

Instantly share code, notes, and snippets.

@tasuten
Last active October 8, 2015 19:09
Show Gist options
  • Save tasuten/748431eeeceb34c18cde to your computer and use it in GitHub Desktop.
Save tasuten/748431eeeceb34c18cde to your computer and use it in GitHub Desktop.
zshのコマンド履歴でよく使うコマンド順に上位10個表示
# これはzshのhistoryの設定に依存するかも
# zshのヒストリファイルを~/.zsh-historyとして
# かつzshのextended_historyをONにしている場合使える
cat $HOME/.zsh-history | awk 'FS=";" {print $2}' | awk '{print $1}'| LANG=C sort | LANG=C uniq -c | LANG=C sort -nr | head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment