complete: remove unescaping of -c/-p values

This removes the need to double-escape the values on the command line
(once for the command line parser, another for the option handling)

This also brings it in line with the implicit case (`complete cmd ...`)

Fixes #12712

Closes #12718
This commit is contained in:
Nahor
2026-05-06 12:31:15 -07:00
committed by Johannes Altmanninger
parent b2c23eb397
commit 01b9fd9e31
3 changed files with 8 additions and 16 deletions

View File

@@ -716,9 +716,6 @@ begin
# CHECK: -command-starting-with-dash{{\t}}command
end
complete --command="foo\\"
# CHECKERR: complete: Invalid token 'foo\'
complete -c foo -a "foo\\"
# CHECKERR: complete: foo\: contains a syntax error
# CHECKERR: complete: Expected a string, but found an incomplete token