mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-15 01:17:45 +00:00
Fix __fish_complete_suffix behavior for paths with literal .
__fish_complete_suffix assumed that the only literal . in a path would be the . before an extension, and stripped accordingly. This behavior has been there for a long time, but broke many things including completion of relative paths and completion of paths with a literal . in a directory name. __fish_complete_suffix does not just complete extensions (or at the very least, it no longer does just that) but rather any suffix, so isolating the path name without the extension was unnecessary in all cases.
This commit is contained in:
parent
cbdd347ec6
commit
72d80c3d91
1 changed files with 3 additions and 5 deletions
|
@ -35,11 +35,9 @@ function __fish_complete_suffix -d "Complete using files"
|
|||
|
||||
# Strip leading ./ as it confuses the detection of base and suffix
|
||||
# It is conditionally re-added below.
|
||||
set -l base_temp (string replace -r '^\\./' '' -- $comp)
|
||||
|
||||
set base (string replace -r '\\.[^.]*$' '' -- $base_temp | string trim -c '\'"') # " make emacs syntax highlighting happy
|
||||
# echo "base: $base" > /dev/tty
|
||||
# echo "suffix: $suff" > /dev/tty
|
||||
set base (string replace -r '^("\')?\\./' '' -- $comp | string trim -c '\'"') # " make emacs syntax highlighting happy
|
||||
echo "base: $base" > /dev/tty
|
||||
echo "suffix: $suff" > /dev/tty
|
||||
|
||||
set -l all
|
||||
set -l dirs
|
||||
|
|
Loading…
Reference in a new issue