Speed shell up with 'fixed' thefuck

This commit is contained in:
Jan Jastrow 2023-09-04 04:05:57 +02:00
parent 2c0dd6666e
commit df9430cde0
1 changed files with 7 additions and 8 deletions

15
zsh/env
View File

@ -79,11 +79,10 @@ fi
# evals
#
# TheFuck
if [[ -x $(which thefuck) ]]; then
eval "$(thefuck --alias)"
# You can use whatever you want as an alias, like for Mondays:
eval "$(thefuck --alias FUCK)"
alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'
fi
# Replace default `thefuck` eval with suggestion from GitHub
# https://github.com/nvbn/thefuck/issues/859
if command -v thefuck >/dev/null 2>&1; then
fuck() {
eval "$(thefuck --alias)" && fuck
}
fi