handle spaces in directories for fasd with fzf

main
Alpha Chen 2 years ago
parent 086cb046d9
commit 561c3232fb
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -146,7 +146,7 @@ if [ $commands[fzf] ]; then
fasd_fzf() {
local dir
dir="$(fasd -Rds "$1" | fzf -1 -0 --no-sort +m | awk '{print $2}')" && cd "${dir}" || return 1
dir="$(fasd -Rds "$1" | fzf -1 -0 --no-sort +m | sed -r 's/^[^[:space:]]+[[:space:]]+//')" && cd "${dir}" || return 1
}
alias j=fasd_fzf # override prezto's fasd integration
fi

Loading…
Cancel
Save