zsh-users
 help / color / mirror / code / Atom feed
* Accidental function definition - bug or feature?
@ 2015-10-22 12:30 Holger Hoffstätte
  2015-10-22 13:47 ` Eric Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Hoffstätte @ 2015-10-22 12:30 UTC (permalink / raw)
  To: zsh-users


Hi,

today I accidentally b0rked my shell with git and an unquoted filename via
copypasta. To reproduce:

$git add foo().bar
$git --version    
git:7: command not found: .bar

Turns out this unhelpfully defined a local function, which now shadows
the command:

$functions git
git () {
	.bar
}

Obviously everything works correctly with quoted filenames.
Also bash complains as I would have expected:

bash$ git add foo().bar
bash: syntax error near unexpected token `('

So..bug or feature?

thanks,
Holger


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

end of thread, other threads:[~2015-10-27 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22 12:30 Accidental function definition - bug or feature? Holger Hoffstätte
2015-10-22 13:47 ` Eric Cook
2015-10-22 16:11   ` ZyX
2015-10-27 16:40     ` Clint Hepner

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