zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Frank Terbeck <ft@bewatermyfriend.org>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: ZSH Shell support - Bug with a special character
Date: Fri, 28 Feb 2014 22:18:38 +0100	[thread overview]
Message-ID: <CAHYJk3TmmpEkhR9gtprrnNoV1t9uTiNp9Jx=vBkzCg6cxwTryw@mail.gmail.com> (raw)
In-Reply-To: <87y50vrp2d.fsf@ft.bewatermyfriend.org>

On 28 February 2014 20:54, Frank Terbeck <ft@bewatermyfriend.org> wrote:
> Peter Stephenson wrote:
>> Tobias <tobias.basteiro@openenglish.com> 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.

You can also just do
% git reset HEAD~
which has the advantage of not being shifted on american keyboards,
and doesn't require escaping in zsh. (As a side note, you can also do
git symbolic-ref h HEAD and then you can say git reset h~ (yes, I'm
very lazy)).

-- 
Mikael Magnusson


  reply	other threads:[~2014-02-28 21:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 17:00 Tobias
2014-02-28 18:37 ` Peter Stephenson
2014-02-28 19:54   ` Frank Terbeck
2014-02-28 21:18     ` Mikael Magnusson [this message]
2014-03-01  0:06       ` Aaron Schrab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3TmmpEkhR9gtprrnNoV1t9uTiNp9Jx=vBkzCg6cxwTryw@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=ft@bewatermyfriend.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).