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

Accidental function definition - bug or feature?



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



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