mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Quote only unique completions, use backslashes for ambiguous ones
Commit 29dc307111 (Insert some completions with quotes instead of backslashes,
2024-04-13) breaks some workflows. Given
touch '[test] file1'
touch '[test] file2'
ls tes<Tab>
we insert completions quoted, which is inconvenient when using globs.
This implicit quoting feature is somewhat minor. But quotes look nicer,
so let's try to keep them. Either way, users can ask for it by starting a
token with «"».
Use quoting only when we insert unique completions.
Closes #11271
This commit is contained in:
@@ -10,7 +10,7 @@ complete -c complete_test_alpha3 --no-files -w 'complete_test_alpha2 extra2'
|
||||
complete -C'complete_test_alpha1 arg1 '
|
||||
# CHECK: complete_test_alpha1 arg1
|
||||
complete --escape -C'complete_test_alpha1 arg1 '
|
||||
# CHECK: 'complete_test_alpha1 arg1 '
|
||||
# CHECK: complete_test_alpha1\ arg1\{{ }}
|
||||
complete -C'complete_test_alpha2 arg2 '
|
||||
# CHECK: complete_test_alpha1 extra1 arg2
|
||||
complete -C'complete_test_alpha3 arg3 '
|
||||
|
||||
Reference in New Issue
Block a user