Mercurial > hg > zsh-env
comparison zshrc @ 77:5cc3c67c9d3f
add a helper function for listing non-comment lines in a file, increase history size
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 21 Aug 2015 04:18:13 +0200 |
parents | efe5f376e911 |
children | a081e7a3977d |
comparison
equal
deleted
inserted
replaced
76:b41590f0a587 | 77:5cc3c67c9d3f |
---|---|
26 compinit | 26 compinit |
27 | 27 |
28 # custom functions/aliases that should work on all platforms | 28 # custom functions/aliases that should work on all platforms |
29 cd() { builtin cd "$@"; print -D $PWD; } | 29 cd() { builtin cd "$@"; print -D $PWD; } |
30 ff() { find $2 -print0 | xargs -0 grep $1 } | 30 ff() { find $2 -print0 | xargs -0 grep $1 } |
31 gve() { grep -ve '^#' $1 | uniq | less } | |
31 hgrep() { history | grep $* } | 32 hgrep() { history | grep $* } |
32 mcd() { mkdir $1; cd $1 } | 33 mcd() { mkdir $1; cd $1 } |
33 psg() { ps auxww | grep -v grep | grep -i "$@" } | 34 psg() { ps auxww | grep -v grep | grep -i "$@" } |
34 alias pd=pushd | 35 alias pd=pushd |
35 alias history="history 1" | 36 alias history="history 1" |
37 alias tl="tmux list-sessions" | 38 alias tl="tmux list-sessions" |
38 alias tn="tmux new -s" | 39 alias tn="tmux new -s" |
39 | 40 |
40 # no history handling for now ... or find a better way to save history per shell not across all shells | 41 # no history handling for now ... or find a better way to save history per shell not across all shells |
41 export HISTFILE= | 42 export HISTFILE= |
42 export HISTSIZE=100 | 43 export HISTSIZE=500 |
43 | 44 |
44 # emulate tcsh's behaviour for forked processes: do not warn, do not kill when shell is closed | 45 # emulate tcsh's behaviour for forked processes: do not warn, do not kill when shell is closed |
45 setopt nohup | 46 setopt nohup |
46 setopt no_check_jobs | 47 setopt no_check_jobs |
47 | 48 |