diff options
author | Francesco Giannelli <bassobassista@gmail.com> | 2021-06-12 05:57:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-11 20:57:04 -0700 |
commit | a2e6a85bf30332005262c312bdd110ae9548a259 (patch) | |
tree | 7d066b6b89e48da9d850982be3e9772110c824e2 | |
parent | 94ea7b4516561c8a7587c7b74351bd6dd4f74583 (diff) | |
download | zsh-a2e6a85bf30332005262c312bdd110ae9548a259.tar.gz zsh-a2e6a85bf30332005262c312bdd110ae9548a259.tar.bz2 zsh-a2e6a85bf30332005262c312bdd110ae9548a259.zip |
fix(plugins): cache thefuck aliases (#5522)
-rw-r--r-- | plugins/thefuck/thefuck.plugin.zsh | 3 |
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)" |