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

Re: ZSH Shell support - Bug with a special character



Peter Stephenson wrote:
> Tobias <tobias.basteiro@xxxxxxxxxxxxxxx> wrote:
>> I'm just trying to run this script:
>>      git reset HEAD^
[...]
>>      zsh: no matches found: HEAD^
[...]
> If you don't need it, simply remove it from the start up file where it's
> turned on or add "unsetopt EXTENDED_GLOB" after whatever code is setting
> it.
>
> If you do need EXTENDED_GLOB for other purposes but don't need that
> particular syntax, and you have the latest version of zsh, you can turn
> off that pattern character,
>
> disable -p '^'

For completeness: Since ^ is just a globbing character with EXTENDED_GLOB,
like * or ? are with normal globbing, you can also just:

  % git reset 'HEAD^'

  or

  % git reset "HEAD^"

  or

  % git reset HEAD\^

But since the Tobias thought the behaviour was a bug, he' probably okay
with Peter's `disable' advice.


Regards, Frank



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