summaryrefslogtreecommitdiff
path: root/plugins/thefuck/thefuck.plugin.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2021-07-11 19:58:51 -0600
committerTuowen Zhao <ztuowen@gmail.com>2021-07-11 19:58:51 -0600
commit617ed3bd9f3d9519fe2354941f3dbf15b0c712ee (patch)
treecaf617b35d3f5f7b5786483eedfcda9361dca108 /plugins/thefuck/thefuck.plugin.zsh
parent0144641b7d8e4e6ff6ce153039b5a827f5347904 (diff)
parent36f444ed7325720ec05f182781ec7d6c9a4d675c (diff)
downloadzsh-617ed3bd9f3d9519fe2354941f3dbf15b0c712ee.tar.gz
zsh-617ed3bd9f3d9519fe2354941f3dbf15b0c712ee.tar.bz2
zsh-617ed3bd9f3d9519fe2354941f3dbf15b0c712ee.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/thefuck/thefuck.plugin.zsh')
-rw-r--r--plugins/thefuck/thefuck.plugin.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh
index b8586c70d..2ab4eb6e2 100644
--- a/plugins/thefuck/thefuck.plugin.zsh
+++ b/plugins/thefuck/thefuck.plugin.zsh
@@ -5,7 +5,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)"