mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
completion: adopt commandline -x replacing deprecated -o
This gives us more accurate completions because completion scripts get expanded paths
This commit is contained in:
@@ -11,7 +11,7 @@ function __fish_preview_current_file --description "Open the file at the cursor
|
||||
# $backslash will parsed as regex which may need additional escaping.
|
||||
set -l backslash '\\\\'
|
||||
not status test-feature regex-easyesc && set backslash $backslash$backslash
|
||||
set file (string replace -ra -- '([ ;#^<>&|()"\'])' "$backslash\$1" (commandline -oc)[-1])
|
||||
set file (string replace -ra -- '([ ;#^<>&|()"\'])' "$backslash\$1" (commandline -xc)[-1])
|
||||
set prefix set
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user