From 561c3232fbc3a5a7425e2e530d2d00fb195a2439 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 21 Jul 2022 21:23:22 -0700 Subject: [PATCH] handle spaces in directories for fasd with fzf --- runcoms/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runcoms/zshrc b/runcoms/zshrc index 65cde3e..357dfc6 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -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