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

Re: Accidental function definition - bug or feature?



> On Oct 22, 2015, at 12:11 PM, ZyX <kp-pav@xxxxxxxxx> wrote:
> 
> 22.10.2015, 16:48, "Eric Cook" <llua@xxxxxxx>:
>>> On 10/22/2015 08:30 AM, Holger Hoffstätte wrote:
>>> 
>>> So..bug or feature?
>>> 
>>> thanks,
>>> Holger
>> 
>> defining multiple functions at once is a feature
>> 
>> mv cp() {
>>  $0 -v "$@"
>> }
>> 
>> or defining multiple TRAP functions to do the same thing are usual uses for it.
> 
> Can be disabled with
> 
>   unsetopt multifuncdef

You can also undefine functions as an immediate fix:

   unfunction git add foo


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