Skip to content

Commit 55b26dd

Browse files
committed
fish_completer: expand path before returning completions
This fixes completions for paths which have "~". ~ expansion will no longer work after the path is enclosed in double quotes, hence expand the path before returning the completion so that subsequent completions will continue to work eg. vim ~/Doc <tab> <tab> The second completion will not work as the path will be enclosed with double quotes after first completion
1 parent fe1c1e7 commit 55b26dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/external_completers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let fish_completer = {|spans|
2424
| from tsv --flexible --noheaders --no-infer
2525
| rename value description
2626
| update value {
27-
if ($in | path exists) {$'"($in | str replace "\"" "\\\"" )"'} else {$in}
27+
if ($in | path exists) {$'"($in | path expand --no-symlink | str replace --all "\"" "\\\"" )"'} else {$in}
2828
}
2929
}
3030
```

0 commit comments

Comments
 (0)