diff --git a/share/functions/__fish_complete_suffix.fish b/share/functions/__fish_complete_suffix.fish index a12d95e6b..7c5ad2e91 100644 --- a/share/functions/__fish_complete_suffix.fish +++ b/share/functions/__fish_complete_suffix.fish @@ -35,7 +35,7 @@ function __fish_complete_suffix -d "Complete using files" # Perform the completion - set base (echo $comp |sed -e 's/\.[a-zA-Z0-9]*$//') + set base (string replace -r '\.[^.]*$' '' -- $comp | string trim -c '\'"') # " make emacs syntax highlighting happy eval "set files $base*$suff" if test $files[1]