[zsh] inline the fasd plugin from OMZ and remove the useless one called 'extract'

This commit is contained in:
Dmytro Meleshko 2021-03-07 13:06:14 +02:00
parent b467ed4d63
commit aecef017f9

View file

@ -49,7 +49,7 @@ _plugin completions 'zsh-users/zsh-completions' "$_checkout_latest_version"
# Oh My Zsh {{{
omz_features=(key-bindings termsupport)
omz_plugins=(git extract fasd)
omz_plugins=(git)
_plugin ohmyzsh 'ohmyzsh/ohmyzsh' \
load='lib/'${^omz_features}'.zsh' \
@ -64,7 +64,19 @@ _plugin completions 'zsh-users/zsh-completions' "$_checkout_latest_version"
# fasd {{{
unalias j
if command_exists fasd; then
# Initialization taken from <https://github.com/ohmyzsh/ohmyzsh/blob/6fbad5bf72fad4ecf30ba4d4ffee62bac582f0ed/plugins/fasd/fasd.plugin.zsh>
fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
if [[ "${commands[fasd]}" -nt "$fasd_cache" || ! -s "$fasd_cache" ]]; then
fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
alias v='f -e "$EDITOR"'
alias o='a -e xdg-open'
# alias j='zz'
j() {
local _fasd_ret
_fasd_ret="$(
@ -80,6 +92,7 @@ j() {
print -- "$_fasd_ret"
fi
}
fi
# }}}