Modified ZSH config
This commit is contained in:
parent
e80d3cd1f4
commit
a7cfcfae70
21
.zlogin
21
.zlogin
@ -1,23 +1,2 @@
|
||||
# Set $PATH
|
||||
# Put only directories in $PATH that exist and remove duplicates
|
||||
typeset -U path # No duplicates
|
||||
path=()
|
||||
|
||||
_prepath() {
|
||||
for dir in "$@"; do
|
||||
dir=${dir:A}
|
||||
[[ ! -d "$dir" ]] && return
|
||||
path=("$dir" $path[@])
|
||||
done
|
||||
}
|
||||
|
||||
_prepath /usr/local/bin /bin /usr/local/sbin # General
|
||||
_prepath /usr/bin /usr/sbin /sbin /Library/Apple/usr/bin # macOS
|
||||
_prepath /usr/sbin /sbin # FreeBSD
|
||||
|
||||
_prepath "$HOME/bin"
|
||||
|
||||
unfunction _prepath
|
||||
|
||||
uname -npsr
|
||||
uptime
|
||||
|
@ -1,16 +1,17 @@
|
||||
## Command history configuration
|
||||
HISTFILE=$HOME/.zsh_history
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=$ZDOTDIR/history
|
||||
HISTSIZE=40000
|
||||
SAVEHIST=40000
|
||||
|
||||
setopt append_history
|
||||
setopt extended_history
|
||||
setopt hist_expire_dups_first
|
||||
setopt hist_ignore_dups # ignore duplication command history list
|
||||
setopt hist_ignore_space
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_verify
|
||||
setopt inc_append_history
|
||||
setopt share_history # share command history data
|
||||
setopt incappendhistory
|
||||
setopt histignorespace
|
||||
setopt histnostore
|
||||
setopt share_history
|
||||
HISTORY_IGNORE='([bf]g *|disown|cd ..|cd -)'
|
||||
|
||||
# Make up and down arrow take what’s typed on the commandline in to account.
|
||||
|
||||
|
20
.zsh/lib/path.zsh
Normal file
20
.zsh/lib/path.zsh
Normal file
@ -0,0 +1,20 @@
|
||||
# Set $PATH
|
||||
# Put only directories in $PATH that exist and remove duplicates
|
||||
typeset -U path # No duplicates
|
||||
path=()
|
||||
|
||||
_prepath() {
|
||||
for dir in "$@"; do
|
||||
dir=${dir:A}
|
||||
[[ ! -d "$dir" ]] && return
|
||||
path=("$dir" $path[@])
|
||||
done
|
||||
}
|
||||
|
||||
_prepath /usr/local/bin /bin /usr/local/sbin # General
|
||||
_prepath /usr/bin /usr/sbin /sbin /Library/Apple/usr/bin # macOS
|
||||
_prepath /usr/sbin /sbin # FreeBSD
|
||||
|
||||
_prepath "$HOME/bin"
|
||||
|
||||
unfunction _prepath
|
@ -4,7 +4,7 @@ hash -d bin=$HOME/bin
|
||||
|
||||
case `uname` in
|
||||
Darwin)
|
||||
hash -d hucb=~$HOME/Sites/christianbaer.me
|
||||
hash -d hucb=$HOME/Sites/christianbaer.me
|
||||
;;
|
||||
Linux)
|
||||
# commands for Linux go here
|
||||
|
Loading…
Reference in New Issue
Block a user