소스 검색

[history] Use fc -l instead of history

`history` is equivalent to `fc -l`, and `fc` is the actual Zsh builtin.

Add the `-n` flag to suppress event numbers when listing.
Eric Nielsen 5 년 전
부모
커밋
81a52a5d7d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/history/init.zsh

+ 1 - 1
modules/history/init.zsh

@@ -37,4 +37,4 @@ setopt HIST_VERIFY
 
 
 # Lists the ten most used commands.
-alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
+alias history-stat="fc -ln 0 | awk '{print \$1}' | sort | uniq -c | sort -nr | head"