Skip to content

Instantly share code, notes, and snippets.

@turboBasic
Last active May 6, 2023 03:05
Show Gist options
  • Save turboBasic/0ceaa554f2b0e3f1f6d55a7e7d74b6d2 to your computer and use it in GitHub Desktop.
Save turboBasic/0ceaa554f2b0e3f1f6d55a7e7d74b6d2 to your computer and use it in GitHub Desktop.
Zshrc file for zdharma-continuum/zinit framework #zsh #zinit #dotfiles
## Global vars
export LESS='--buffers=128 --HILITE-UNREAD --ignore-case --LONG-PROMPT --max-back-scroll=15 --no-init --quiet --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --status-column --tabs=4 --window=-4'
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export FZF_DEFAULT_OPTS='--height 50% --ansi --info=inline'
export EDITOR='/usr/local/bin/nvim'
## zinit
source ~/.zinit/bin/zinit.zsh
load_for=(light-mode lucid)
zinit $load_for for \
zdharma-continuum/z-a-meta-plugins \
zdharma-continuum/zinit-annex-unscope \
zdharma-continuum/zinit-annex-readurl \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-submods \
zdharma-continuum/zinit-annex-bin-gem-node \
@sharkdp \
id-as='generate-ls-colors' \
atclone='zsh --no-rcs generate-ls-colors molokai > colors.sh' \
atpull='%atclone' \
pick='colors.sh' \
atload='zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}"' \
nocompile='!' \
https://gist.githubusercontent.com/turboBasic/26d0b94957864767a07f18e7c689a0ce/raw/generate.sh \
compile='(pure|async).zsh' pick='async.zsh' src='pure.zsh' \
sindresorhus/pure
zinit $load_for for \
wait='1' atload='_zsh_autosuggest_start' \
zsh-users/zsh-autosuggestions \
blockf \
zsh-users/zsh-completions
zinit $load_for for \
atload='unfunction uninstall_oh_my_zsh upgrade_oh_my_zsh' \
OMZL::functions.zsh \
\
OMZL::clipboard.zsh \
OMZL::git.zsh \
OMZP::aws \
OMZP::invoke \
OMZP::jfrog \
OMZP::pip \
zinit $load_for wait for \
pack='bgn-binary+keys' \
fzf \
id-as='brew-utils' \
sbin='^*.md' \
nocompile \
atclone='(
for i in /usr/local/opt/curl/bin/*(*) \
/usr/local/opt/{findutils,gnu-sed,gnu-tar,grep}/libexec/gnubin/*(@) \
/usr/local/opt/coreutils/libexec/gnubin/*(@)
do
[[ -x $i:P ]] && ln -sf $i $i:t || rm -f $i:t
done )' \
atpull='atclone' \
zdharma-continuum/null \
\
from='gh-r' \
as='program' \
atclone='./direnv hook zsh > zhook.zsh' \
mv='direnv* -> direnv' \
atpull='%atclone' \
pick='direnv' \
src='zhook.zsh' \
direnv/direnv \
\
pick='misc/quitcd/quitcd.zsh' \
sbin \
make \
light-mode \
jarun/nnn \
\
id-as='ripgrep' \
as='completion' \
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/ripgrep/_ripgrep \
[[ true == ${load_pyenv:-true} ]] &&
zinit $load_for for \
wait='1a' \
as='null' \
nocompile='!' \
submods='pyenv/pyenv-virtualenv -> plugins/pyenv-virtualenv' \
src='zpyenv.zsh' \
sbin='bin/pyenv' \
atclone='{ export PYENV_ROOT="$PWD"; ./libexec/pyenv init - && ./libexec/pyenv virtualenv-init - } > zpyenv.zsh' \
atpull='%atclone' \
atinit='export PYENV_ROOT="$PWD"' \
pyenv/pyenv
[[ true == ${load_sdkman:-true} ]] &&
zinit $load_for for \
wait='1b' \
as='null' \
id-as='sdkman' \
cp='$ZPFX/sdkman/bin/sdkman-init.sh -> sdkman-init.zsh' \
compile='sdkman-init.zsh' \
run-atpull \
atclone='curl --output scr.sh "https://get.sdkman.io/?rcupdate=false"
SDKMAN_DIR=$ZPFX/sdkman bash scr.sh' \
atpull='SDKMAN_DIR=$ZPFX/sdkman sdk selfupdate' \
atload='SDKMAN_DIR=$ZPFX/sdkman source sdkman-init.zsh' \
atinit='export SDKMAN_DIR=$ZPFX/sdkman' \
zdharma-continuum/null
zinit $load_for for wait atinit='ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay' \
zdharma-continuum/fast-syntax-highlighting
unset load_for load_pyenv load_sdkman
## Zsh options and variables
setopt interactive_comments
typeset -U cdpath
cdpath+=( ) # CDPATH is set in .zshenv
## Key bindings
bindkey '^U' push-input
## Aliases
alias history='builtin fc -il'
alias ls='ls --color=auto --time-style=long-iso --group-directories-first'
alias l='ls --almost-all --classify --format=long'
alias d-i-f='docker images --format="{{.ID}}・{{if gt (len .Repository) 35}}…{{slice .Repository (slice .Repository 34|len)}}{{else}}{{printf \"%-35s\" .Repository}}{{end}}・{{if gt (len .Tag) 15}}{{slice .Tag 14}}…{{else}}{{.Tag}}{{end}}"'
## History
HISTFILE=${HISTFILE:-"$HOME/.zsh_history"}
HISTSIZE=999999999
SAVEHIST=$HISTSIZE
setopt extended_history \
share_history \
hist_find_no_dups \
hist_ignore_space \
hist_ignore_dups \
hist_no_store \
hist_reduce_blanks \
hist_verify \
## GNU/Homebrew versions of utils
typeset -U PATH path=(
$HOME/.local/bin
/usr/local/sbin
$path
)
typeset -U MANPATH manpath=(
/usr/local/opt/coreutils/libexec/gnuman
/usr/local/opt/findutils/share/man
/usr/local/opt/gnu-tar/share/man
/usr/local/opt/gnu-sed/share/man
/usr/local/opt/grep/share/man
/usr/local/opt/curl/share/man
$ZPFX/man
${manpath:-"/usr/share/man"}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment