Mercurial > hg > zsh-env
comparison zshrc @ 127:4c87719f258c
Avoid complaining about compinit when running as sudo
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Fri, 16 Feb 2018 02:20:37 +0100 |
parents | b3ffe2fba3ac |
children | 163ef90dd755 |
comparison
equal
deleted
inserted
replaced
126:6f008c7a63d7 | 127:4c87719f258c |
---|---|
22 fi | 22 fi |
23 | 23 |
24 # enable zsh's fancy autocomplete | 24 # enable zsh's fancy autocomplete |
25 fpath=(~/.zsh-env/completion $fpath) | 25 fpath=(~/.zsh-env/completion $fpath) |
26 autoload -U compinit | 26 autoload -U compinit |
27 compinit | 27 |
28 # -u avoids compinit complaining when running as root (see man zshcompsys) | |
29 compinit -u | |
28 | 30 |
29 # custom functions/aliases that should work on all platforms | 31 # custom functions/aliases that should work on all platforms |
30 cd() { builtin cd "$@"; print -D $PWD; } | 32 cd() { builtin cd "$@"; print -D $PWD; } |
31 ff() { find $2 -print0 | xargs -0 grep $1 } | 33 ff() { find $2 -print0 | xargs -0 grep $1 } |
32 gve() { grep -ve '^#' $1 | uniq | less } | 34 gve() { grep -ve '^#' $1 | uniq | less } |