chore: this borders on code golf

This commit is contained in:
Daylin Morgan 2023-01-25 16:03:24 -06:00
parent 9e926666d0
commit 5939e5172b

View file

@ -24,47 +24,26 @@ setopt APPEND_HISTORY
# Disable autocd # Disable autocd
unsetopt autocd unsetopt autocd
# Vim Settings is-executable nvim && export EDITOR=nvim || export EDITOR=vim
# export VIMINIT='source $MYVIMRC'
# export MYVIMRC='$DOTFILES_DIR/lib/.vimrc'
if is-executable nvim; then is-executable lf && source "$XDG_CONFIG_HOME/lf/lfcd.sh"
export EDITOR=nvim
else
export EDITOR=vim
fi
# spelling correction
# setopt CORRECT
# setopt CORRECT_ALL
# Add lfcd command
# ----------------
if is-executable lf; then
source "$XDG_CONFIG_HOME/lf/lfcd.sh"
fi
# ----------------
#
if is-executable fnm && ! is-tty; then if is-executable fnm && ! is-tty; then
eval "$(fnm env --shell zsh)" eval "$(fnm env --shell zsh)"
fi fi
#
if is-executable bat; then is-executable bat && \
export BAT_THEME=Catppuccin export BAT_THEME=Catppuccin; \
export BAT_STYLE=header,numbers,grid export BAT_STYLE=header,numbers,grid
fi
if is-executable zoxide; then
is-executable zoxide && \
export _ZO_FZF_OPTS="--preview 'command lsd --tree --color always --icon always {2..}'" export _ZO_FZF_OPTS="--preview 'command lsd --tree --color always --icon always {2..}'"
fi
export ENHANCD_DOT_ARG="up" is-tty && \
export STARSHIP_CONFIG=~/.config/starship/plain.toml \
if is-tty; then || \
export STARSHIP_CONFIG=~/.config/starship/plain.toml
else
export STARSHIP_CONFIG=~/.config/starship/config.toml export STARSHIP_CONFIG=~/.config/starship/config.toml
fi
export EGET_BIN=$HOME/bin export EGET_BIN=$HOME/bin
@ -76,9 +55,7 @@ export ZSH_DOTENV_DISALLOWED_LIST=$HOME/.cache/dotenv-disallowed.list
export MAMBA_NO_BANNER=1 export MAMBA_NO_BANNER=1
# shiv # shiv
if is-executable shiv; then is-executable shiv && export SHIV_ROOT=$HOME/.local/share/shiv
export SHIV_ROOT=$HOME/.local/share/shiv
fi
# pyenv # pyenv
if [ -d "$HOME/.pyenv" ]; then if [ -d "$HOME/.pyenv" ]; then
@ -90,21 +67,17 @@ if [ -d "$HOME/.pyenv" ]; then
fi fi
# pnpm # pnpm
export PNPM_HOME="$HOME/.local/share/pnpm" is-executable pnpm && \
# export PATH="$PNPM_HOME:$PATH" export PNPM_HOME="$HOME/.local/share/pnpm"; \
add-to-path prepend "$PNPM_HOME" add-to-path prepend "$PNPM_HOME"
if [ -d "$HOME/.pkgs/google-cloud-sdk" ]; then [ -d "$HOME/.pkgs/google-cloud-sdk" ] && \
source "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc" source "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc"; \
# source "$HOME/.pkgs/google-cloud-sdk/path.zsh.inc"
add-to-path prepend "$HOME/.pkgs/google-cloud-sdk/bin" add-to-path prepend "$HOME/.pkgs/google-cloud-sdk/bin"
fi
if [ -d "$HOME/.deno" ]; then [ -d "$HOME/.deno" ] && \
export DENO_INSTALL="$HOME/.deno" export DENO_INSTALL="$HOME/.deno"; \
# export PATH="$DENO_INSTALL/bin:$PATH"
add-to-path prepend "$DENO_INSTALL/bin" add-to-path prepend "$DENO_INSTALL/bin"
fi
if [ -d "$HOME/.bun" ]; then if [ -d "$HOME/.bun" ]; then
# bun completions # bun completions
@ -112,11 +85,7 @@ if [ -d "$HOME/.bun" ]; then
# bun # bun
export BUN_INSTALL="$HOME/.bun" export BUN_INSTALL="$HOME/.bun"
# export PATH="$BUN_INSTALL/bin:$PATH"
add-to-path prepend "$BUN_INSTALL/bin" add-to-path prepend "$BUN_INSTALL/bin"
fi fi
if [ -d "$HOME/.nimble" ]; then [ -d "$HOME/.nimble" ] && add-to-path prepend "$HOME/.nimble/bin"
# export PATH=/home/daylin/.nimble/bin:$PATH
add-to-path prepend "$HOME/.nimble/bin"
fi