__fish_complete_suffix: Remove –foo= from token

Otherwise we get --foo=--foo= suggested.

Fixes #12374. Related to #9538.

Closes #12400
This commit is contained in:
Tiago de Paula
2026-01-30 22:16:41 -03:00
committed by Johannes Altmanninger
parent e78e3f16e1
commit b980e50acf

View File

@@ -11,7 +11,8 @@
# is preserved.
function __fish_complete_suffix -d "Complete using files"
set -l _flag_prefix ""
set -l _flag_complete (commandline -ct)
# We need to remove '--name=' from the completion. See __fish_complete_directories
set -l _flag_complete (commandline -ct | string replace -r -- '^-[^=]*=' '')
argparse 'prefix=' 'description=' 'complete=' -- $argv