zsh: add alias, increase hist size, add bbgrep
This commit is contained in:
parent
6b1b098945
commit
5f177f1df8
@ -2,8 +2,8 @@
|
||||
#man zshcontrib
|
||||
# Lines configured by zsh-newuser-install
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
export HISTTIMEFORMAT="%h/%d - %H:%M:%S "
|
||||
#export HISTCONTROL=ignoredups
|
||||
export HISTCONTROL=erasedups
|
||||
|
@ -23,6 +23,7 @@ alias minicom='minicom -c on'
|
||||
alias vims='vim --servername vimserver'
|
||||
alias vimo='vim --servername vimserver --remote-tab'
|
||||
alias agrep='grep --exclude=.git --exclude-dir=out --exclude-dir=prebuilts --exclude-dir=docs --exclude=tags --exclude=cscope.out'
|
||||
alias beep='mpv /usr/share/sounds/freedesktop/stereo/complete.oga &> /dev/null &' #sound in package sound-theme-freedesktop
|
||||
|
||||
#Extension Alias
|
||||
alias -s html=$BROWSER
|
||||
@ -40,6 +41,7 @@ alias -s bz2=tar -xjvf
|
||||
alias -s java=$EDITOR
|
||||
alias -s txt=$EDITOR
|
||||
alias -s PKGBUILD=$EDITOR
|
||||
alias -s pdf=evince
|
||||
|
||||
|
||||
# command L equivalent to command |less
|
||||
|
@ -94,6 +94,10 @@ mgrep () {
|
||||
find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -type f -print0 | xargs -0 grep --color -n "$@"
|
||||
}
|
||||
|
||||
bbgrep () {
|
||||
find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.bb' -o -name '*.bbclass' -o -name '*.bbappend' \) -print0 | xargs -0 grep --color -n "$@"
|
||||
}
|
||||
|
||||
cgrep () {
|
||||
find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) -print0 | xargs -0 grep --color -n "$@"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user