add .zshenv

This commit is contained in:
thek4n 2024-01-13 00:57:42 +03:00
parent c24ed52238
commit cb4c486777
6 changed files with 28 additions and 31 deletions

View File

@ -27,14 +27,6 @@ if [ -d "$HOME/.npm-global/bin" ] ; then
export PATH="$HOME/.npm-global/bin:$PATH" export PATH="$HOME/.npm-global/bin:$PATH"
fi fi
if [ -d "$HOME/.go/bin" ] ; then
export PATH="$HOME/.go/bin:$PATH"
fi
if [ -d "$HOME/.go" ] ; then
export GOPATH="$HOME/.go"
fi
for TMPDIR in "$TMPDIR" "$TMP" /tmp /var/tmp for TMPDIR in "$TMPDIR" "$TMP" /tmp /var/tmp
do do
test -d "$TMPDIR" && break test -d "$TMPDIR" && break

View File

@ -0,0 +1,6 @@
# .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles
if [ -f "$ZDOTDIR/sourcer" ]; then
source "$ZDOTDIR/sourcer"
fi

View File

@ -3,22 +3,18 @@ _so() {
} }
_so /etc/zsh_command_not_found _so /etc/zsh_command_not_found
_so "$HOME/.config/zsh/options" _so "$ZDOTDIR/options"
_so "$HOME/.config/zsh/completion" _so "$ZDOTDIR/completion"
_so "$HOME/.config/zsh/history" _so "$ZDOTDIR/history"
_so "$HOME/.config/zsh/prompt" _so "$ZDOTDIR/prompt"
_so "$HOME/.config/zsh/other" _so "$ZDOTDIR/other"
_so "$HOME/.config/zsh/plugin" _so "$ZDOTDIR/plugin"
_so "$HOME/.config/zsh/aliases" _so "$ZDOTDIR/aliases"
_so "$HOME/.config/bash/aliases" _so "$XDG_CONFIG_HOME/bash/aliases"
_so "$HOME/.config/bash/completion" _so "$XDG_CONFIG_HOME/bash/completion"
_so "$HOME/.config/bash/export" _so "$XDG_CONFIG_HOME/bash/functions"
_so "$HOME/.config/bash/functions" _so "$XDG_CONFIG_HOME/bash/hosts/$HOST"
_so "$HOME/.config/bash/hosts/$HOST"
_so "$HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" _sod "$ZDOTDIR/zshrc.d"
_sod "$HOME/.config/zsh/zshrc.d"

9
home/user/.zshenv Normal file
View File

@ -0,0 +1,9 @@
_so() {
[ -r "$1" ] && [ -f "$1" ] && source "$1"
}
export XDG_CONFIG_HOME="$HOME/.config"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
_so "$XDG_CONFIG_HOME/bash/export"

View File

@ -1,6 +0,0 @@
# .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles
if [ -f $HOME/.config/zsh/sourcer ]; then
source $HOME/.config/zsh/sourcer
fi

View File

@ -12,7 +12,7 @@ export SUB
declare -r -A TARGETS=( declare -r -A TARGETS=(
["bash"]=".config/bash .bashrc .profile" ["bash"]=".config/bash .bashrc .profile"
["zsh"]="%bash .config/zsh .zshrc .zprofile .zlogout .inputrc" ["zsh"]="%bash .config/zsh .zshenv .zprofile .zlogout .inputrc"
["tmux"]=".tmux.conf" ["tmux"]=".tmux.conf"
["alacritty"]=".config/alacritty" ["alacritty"]=".config/alacritty"
["nvim"]=".config/nvim .local/bin/vim_askpass_helper .local/bin/vim_askpass_helper_python" ["nvim"]=".config/nvim .local/bin/vim_askpass_helper .local/bin/vim_askpass_helper_python"