mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
421ce13be6
Commit29dc30711
(Insert some completions with quotes instead of backslashes, 2024-04-13) wrongly copmletes $ cat ~/space to $ cat '~/path with spaces' Today completions can be either replacing or appending. We never quote (but backslash-escape) appending completions (unless they "append" to an empty token). We always quote replacing completions. The assumption in this part of the code is that replacing completions can be quoted without changing meaning. This assumption is wrong for tildes. For the backslash-escaping code path, we take care of this edge case via a special DONT_ESCAPE_TILDES flag. However that flag does not take effect when using quotes for escaping. Fix that. Unfortunately,e97a4fab7
(Escape : and = in file completions, 2024-04-19) introduced a (hopefully temporary) code clone in escape_separators, which made added an extra step to debugging here.
13 lines
362 B
Fish
13 lines
362 B
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
#REQUIRES: uname -r | grep -qv Microsoft
|
|
# cautiously disable because tmux-complete.fish is disabled
|
|
#REQUIRES: test -z "$CI"
|
|
|
|
isolated-tmux-start
|
|
|
|
isolated-tmux send-keys 'touch ~/"path with spaces"' Enter C-l \
|
|
'cat ~/space' Tab
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 1> cat ~/path\ with\ spaces
|