Skip to content

Instantly share code, notes, and snippets.

@aileron
Created August 3, 2021 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aileron/64768744c639b72976cdd8b29666adaf to your computer and use it in GitHub Desktop.
Save aileron/64768744c639b72976cdd8b29666adaf to your computer and use it in GitHub Desktop.
.zhsrc.history
# hisotry
HISTFILE=$HOME/.history # 履歴をファイルに保存する
HISTSIZE=10000000 # メモリ内の履歴の数
SAVEHIST=10000000 # 保存される履歴の数
setopt hist_ignore_dups # 重複を記録しない
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_reduce_blanks # スペース排除
setopt extended_history # 履歴ファイルに時刻を記録
setopt share_history # 端末間の履歴を共有
function history-all { history -E 1 } # 全履歴の一覧を出力する
function history-time { history-all | awk '{print $2" "$3}' | ruby ~/bin/calc_time.rb }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment