cool function
This commit is contained in:
parent
0f329689e6
commit
b80e40a67f
4
.zshrc
4
.zshrc
|
@ -79,6 +79,9 @@ if __name__ == \"__main__\":
|
|||
evaluate_and_print(expr)
|
||||
"
|
||||
}
|
||||
function countlines() {
|
||||
find . -type f -name "$1" -exec wc -l {} \; | awk '{print $0} {total += $1} END {print "Total lines:", total}'
|
||||
}
|
||||
|
||||
### ---- zsh options -------------------------------------
|
||||
setopt autocd
|
||||
|
@ -197,6 +200,7 @@ fpath=($ZSH/plugins/zsh-completions/src $fpath)
|
|||
|
||||
ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m')
|
||||
ZAQ_PREFIXES_GREEDY+=('py #')
|
||||
ZAQ_PREFIXES_GREEDY+=('countlines #')
|
||||
|
||||
### --- fzf Config ------------------------------------
|
||||
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
|
||||
|
|
Loading…
Reference in New Issue