cache thefuck aliases

This commit is contained in:
Francesco Giannelli 2016-10-11 17:35:59 +02:00 committed by GitHub
parent c24dfa1ab4
commit 67d7c26791

View File

@ -4,7 +4,8 @@ if [[ -z $commands[thefuck] ]]; then
fi
# Register alias
eval "$(thefuck --alias)"
[[ ! -a $ZSH_CACHE_DIR/thefuck ]] && thefuck --alias > $ZSH_CACHE_DIR/thefuck
source $ZSH_CACHE_DIR/thefuck
fuck-command-line() {
local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"