__fish_complete_suffix: don't fail when a part of the suffix is present

Resolves #7233
This commit is contained in:
Johannes Altmanninger 2020-08-01 16:55:01 +02:00
parent 7a77907b62
commit ac1f63781d

View file

@ -60,7 +60,8 @@ function __fish_complete_suffix -d "Complete using files"
# Also do directory completion, since there might be files with the correct
# suffix in a subdirectory.
set all $base*$suff
set all $base*
set all (string match -r -- ".*"(string escape --style=regex -- $suff) $all)
if not string match -qr '/$' -- $suff
set dirs $base*/