44f2a128aaee9f52391fe357d103e54f7f40fabb

Author
Eve <162624394+aviu16@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(thefuck): quote ZSH_CACHE_DIR path (#13569)

path wasnt quoted, would break if it had spaces

Diff

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