Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

spaces not escaped when completion matches filename with spaces



I’ve encountered an issue where git completion matching a filename with spaces doesn’t escape the spaces for the command:

$ zsh --version
zsh 5.2 (x86_64-apple-darwin15.0.0)
$ git init foo
Initialized empty Git repository in /Users/jaraco/Dropbox/code/yg/queso/foo/.git/
$ cd foo
$ touch 'foo bar'
$ git add f^t
fatal: pathspec 'foo' did not match any files

The ^t represents a tab and completes “f” to “foo bar”, but without any escaping.

I’ve seen this issue reported for other commands.

Note that zsh doesn’t have this issue when resolving a filename for other commands such as ‘rm’.




Messages sorted by: Reverse Date, Date, Thread, Author