Skip to content

Commit

Permalink
[Search directory] fix specifying base directories using quotes (#163)
Browse files Browse the repository at this point in the history
To reproduce the bug, create a folder titled 'with space/' and trigger directory search. It won't scope the search to the folder.
  • Loading branch information
kidonng authored May 28, 2021
1 parent c1669c2 commit 756513f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/__fzf_search_current_dir.fish
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function __fzf_search_current_dir --description "Search the current directory. R

# If the current token is a directory and has a trailing slash,
# then use it as fd's base directory.
if string match --quiet -- "*/" $token && test -d "$unescaped_exp_token"
if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token"
set --append fd_opts --base-directory=$unescaped_exp_token
# use the directory name as fzf's prompt to indicate the search is limited to that directory
set --prepend fzf_arguments --prompt="$unescaped_exp_token" --preview="__fzf_preview_file $expanded_token{}"
Expand Down

0 comments on commit 756513f

Please sign in to comment.