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

Re: path and += troubles



On Nov 26,  6:40pm, Peter Stephenson wrote:
} Subject: Re: path and += troubles
}
} > On Nov 25,  9:32pm, Steven Klass wrote:
} > }
} > } 		$1+=($2)
} > 
} > For some reason "setopt nullglob" (even cshnullglob) prevents the error
} > message that would otherwise be produced for this line, turning it into
} > a silent no-op.  I think that's probably an obscure bug.
} 
} It's a bug if you think the "=" should always indicate an assignment

No, that's not it.

} Otherwise, it looks like
} an expression with a set of globbing qualifiers at the end

Exactly ... the problem is this:

schaefer<508> echo $1+=($2)
zsh: no match
schaefer<509> $1+=($2)
schaefer<510> 

Where's my "no match" error in the second case?

} At the moment lexical analysis is fairly restrictive about what it will
} consider an assignment; if it doesn't like it, it will decide it's just
} an ordinary string, so the word will be parsed as a command.

That's just fine, and I don't think it should be changed.



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