zsh-workers
 help / color / mirror / code / Atom feed
* spaces not escaped when completion matches filename with spaces
@ 2016-10-24 20:19 Jason R. Coombs
  2016-10-24 20:54 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Jason R. Coombs @ 2016-10-24 20:19 UTC (permalink / raw)
  To: zsh-workers

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’.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: spaces not escaped when completion matches filename with spaces
  2016-10-24 20:19 spaces not escaped when completion matches filename with spaces Jason R. Coombs
@ 2016-10-24 20:54 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2016-10-24 20:54 UTC (permalink / raw)
  To: Jason R. Coombs; +Cc: zsh-workers

Jason R. Coombs wrote on Mon, Oct 24, 2016 at 20:19:06 +0000:
> $ 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.

In master it does add the escaping:

% git add fo<TAB>
% git add foo\ bar


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-24 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24 20:19 spaces not escaped when completion matches filename with spaces Jason R. Coombs
2016-10-24 20:54 ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).