now using zsh4humans
This commit is contained in:
parent
2da4001e62
commit
aff8aadee6
3 changed files with 155 additions and 76 deletions
49
dot_zshenv
49
dot_zshenv
|
@ -1,6 +1,49 @@
|
|||
export WINPATH=$(tr ':' '\n' <<<"$PATH" | grep -E '^(/mnt)/c/' | paste -sd ':')
|
||||
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$WINPATH"
|
||||
|
||||
[[ -n $SSH_CONNECTION ]] && export EDITOR='vim' || export EDITOR='nvim'
|
||||
# Documentation: https://github.com/romkatv/zsh4humans/blob/v5/README.md.
|
||||
#
|
||||
# Do not modify this file unless you know exactly what you are doing.
|
||||
# It is strongly recommended to keep all shell customization and configuration
|
||||
# (including exported environment variables such as PATH) in ~/.zshrc or in
|
||||
# files sourced from ~/.zshrc. If you are certain that you must export some
|
||||
# environment variables in ~/.zshenv, do it where indicated by comments below.
|
||||
|
||||
[[ -f "$HOME/.config/local/env.zsh" ]] && source "$HOME/.config/local/env.zsh"
|
||||
if [ -n "${ZSH_VERSION-}" ]; then
|
||||
: ${ZDOTDIR:=~}
|
||||
setopt no_global_rcs
|
||||
if [[ -o no_interactive && -z "${Z4H_BOOTSTRAPPING-}" ]]; then
|
||||
return
|
||||
fi
|
||||
setopt no_rcs
|
||||
unset Z4H_BOOTSTRAPPING
|
||||
|
||||
# If you are certain that you must export some environment variables
|
||||
# in ~/.zshenv (see comments at the top!), do it here:
|
||||
#
|
||||
# export GOPATH=$HOME/go
|
||||
#
|
||||
# Do not change anything else in this file.
|
||||
fi
|
||||
|
||||
Z4H_URL="https://raw.githubusercontent.com/romkatv/zsh4humans/v5"
|
||||
: "${Z4H:=${XDG_CACHE_HOME:-$HOME/.cache}/zsh4humans/v5}"
|
||||
|
||||
umask o-w
|
||||
|
||||
if [ ! -e "$Z4H"/z4h.zsh ]; then
|
||||
mkdir -p -- "$Z4H" || return
|
||||
>&2 printf '\033[33mz4h\033[0m: fetching \033[4mz4h.zsh\033[0m\n'
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
curl -fsSL -- "$Z4H_URL"/z4h.zsh >"$Z4H"/z4h.zsh.$$ || return
|
||||
elif command -v wget >/dev/null 2>&1; then
|
||||
wget -O- -- "$Z4H_URL"/z4h.zsh >"$Z4H"/z4h.zsh.$$ || return
|
||||
else
|
||||
>&2 printf '\033[33mz4h\033[0m: please install \033[32mcurl\033[0m or \033[32mwget\033[0m\n'
|
||||
return 1
|
||||
fi
|
||||
mv -- "$Z4H"/z4h.zsh.$$ "$Z4H"/z4h.zsh || return
|
||||
fi
|
||||
|
||||
. "$Z4H"/z4h.zsh || return
|
||||
|
||||
setopt rcs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue