You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected completion is ./foo.py ~/.bashrc and this is what happens on bash. However on zsh, I get ./foo.py \~/.bashrc.
In both cases, the FilesCompleter returns the path as ~/.bashrc (not escaped), so the escaping happens later on in the pipeline. In particular, this is part of the zsh built-in _describe which in turn calls compadd to add the string ~/.bashrc to the list of suggestions. At this point the string is escaped. There are options to prevent this escaping that can also be passed to _describe but it is not clear to me, which one to use (https://zsh.sourceforge.io/Doc/zsh_us.pdf, chapter 19.3 for compadd and 20.6 for _describe). For example, -Q would disable escaping completely but this would be an issue for paths with spaces. Then something like -f -W \~ might work but it assumes that the returned values are paths.
The text was updated successfully, but these errors were encountered:
The alias
~
for the home directory is escaped on zsh.To reproduce
Test environment:
Content of
foo.py
Expected completion is
./foo.py ~/.bashrc
and this is what happens on bash. However on zsh, I get./foo.py \~/.bashrc
.In both cases, the
FilesCompleter
returns the path as~/.bashrc
(not escaped), so the escaping happens later on in the pipeline. In particular, this is part of the zsh built-in_describe
which in turn callscompadd
to add the string~/.bashrc
to the list of suggestions. At this point the string is escaped. There are options to prevent this escaping that can also be passed to_describe
but it is not clear to me, which one to use (https://zsh.sourceforge.io/Doc/zsh_us.pdf, chapter 19.3 forcompadd
and 20.6 for_describe
). For example,-Q
would disable escaping completely but this would be an issue for paths with spaces. Then something like-f -W \~
might work but it assumes that the returned values are paths.The text was updated successfully, but these errors were encountered: