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
|
uname -npsr
|
||||||
uptime
|
uptime
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
## Command history configuration
|
## Command history configuration
|
||||||
HISTFILE=$HOME/.zsh_history
|
HISTFILE=$ZDOTDIR/history
|
||||||
HISTSIZE=10000
|
HISTSIZE=40000
|
||||||
SAVEHIST=10000
|
SAVEHIST=40000
|
||||||
|
|
||||||
setopt append_history
|
setopt append_history
|
||||||
setopt extended_history
|
setopt extended_history
|
||||||
setopt hist_expire_dups_first
|
setopt hist_ignore_dups
|
||||||
setopt hist_ignore_dups # ignore duplication command history list
|
|
||||||
setopt hist_ignore_space
|
|
||||||
setopt hist_verify
|
setopt hist_verify
|
||||||
setopt inc_append_history
|
setopt incappendhistory
|
||||||
setopt share_history # share command history data
|
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.
|
# 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
|
case `uname` in
|
||||||
Darwin)
|
Darwin)
|
||||||
hash -d hucb=~$HOME/Sites/christianbaer.me
|
hash -d hucb=$HOME/Sites/christianbaer.me
|
||||||
;;
|
;;
|
||||||
Linux)
|
Linux)
|
||||||
# commands for Linux go here
|
# commands for Linux go here
|
||||||
|
4
.zshrc
4
.zshrc
@ -1,7 +1,7 @@
|
|||||||
export ZSH=~/.zsh
|
ZDOTDIR=~/.zsh
|
||||||
|
|
||||||
# Load all of the config files in $ZSH/lib that end in .zsh
|
# Load all of the config files in $ZSH/lib that end in .zsh
|
||||||
for config_file ($ZSH/lib/*.zsh) source $config_file
|
for config_file ($ZDOTDIR/lib/*.zsh) source $config_file
|
||||||
|
|
||||||
# Load and run compinit
|
# Load and run compinit
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
|
Loading…
Reference in New Issue
Block a user