a2e6a85bf30332005262c312bdd110ae9548a259

Author
Francesco Giannelli <bassobassista@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(plugins): cache thefuck aliases (#5522)

Diff

 1diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh
 2index b8586c70d9aae241fb4bf2e3e3dc43b09cb2bdab..2ab4eb6e270699b87fbf7a411962372808664ada 100644
 3--- a/plugins/thefuck/thefuck.plugin.zsh
 4+++ b/plugins/thefuck/thefuck.plugin.zsh
 5@@ -5,7 +5,8 @@ if [[ -z $commands[thefuck] ]]; then
 6 fi
 7 
 8 # Register alias
 9-eval "$(thefuck --alias)"
10+[[ ! -a $ZSH_CACHE_DIR/thefuck ]] && thefuck --alias > $ZSH_CACHE_DIR/thefuck
11+source $ZSH_CACHE_DIR/thefuck
12 
13 fuck-command-line() {
14     local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"