zsh-users
 help / color / mirror / code / Atom feed
* Searching for "^" in the history
@ 2005-02-10 14:16 Vincent Lefevre
       [not found] ` <16907.30377.109401.427969@parhasard.net>
  2005-02-10 18:08 ` Wayne Davison
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent Lefevre @ 2005-02-10 14:16 UTC (permalink / raw)
  To: zsh-users

Hi,

How can one search for the character "^" in the history (with
history-incremental-search-backward)? I've tried by escaping it
with \ but this doesn't work.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Searching for "^" in the history
       [not found] ` <16907.30377.109401.427969@parhasard.net>
@ 2005-02-10 15:22   ` Vincent Lefevre
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Lefevre @ 2005-02-10 15:22 UTC (permalink / raw)
  To: zsh-users

On 2005-02-10 15:58:49 +0100, Aidan Kehoe wrote:
> 
>  Ar an deichiú lá de mí Feabhra, scríobh Vincent Lefevre: 
> 
>  > How can one search for the character "^" in the history (with
>  > history-incremental-search-backward)? I've tried by escaping it
>  > with \ but this doesn't work.
> 
> C-r C-v ^
> 
> (That is, precede it with a call to the command quoted-insert.)

This doesn't work (quoted-insert is for special characters in the
terminal sense, ^ is a special character for the history search).

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Searching for "^" in the history
  2005-02-10 14:16 Searching for "^" in the history Vincent Lefevre
       [not found] ` <16907.30377.109401.427969@parhasard.net>
@ 2005-02-10 18:08 ` Wayne Davison
  2005-02-11  0:09   ` Vincent Lefevre
  1 sibling, 1 reply; 4+ messages in thread
From: Wayne Davison @ 2005-02-10 18:08 UTC (permalink / raw)
  To: zsh-users

On Thu, Feb 10, 2005 at 03:16:44PM +0100, Vincent Lefevre wrote:
> How can one search for the character "^" in the history (with
> history-incremental-search-backward)?

The only way is to not put it as the first character in the search
string -- i.e. to search for the character prior to the "^" as well as
the "^" itself.  Yeah, that means that there is no way to search for
just a "^" in zsh's current code.  In the future it might be nice to
upgrade the incremental search to a regex-understanding search like vim
uses (it treats invalid regex elements as literal strings, so you can
eaily search for something like "[" or "$" without having to backslash
it).

..wayne..


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Searching for "^" in the history
  2005-02-10 18:08 ` Wayne Davison
@ 2005-02-11  0:09   ` Vincent Lefevre
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Lefevre @ 2005-02-11  0:09 UTC (permalink / raw)
  To: zsh-users

On 2005-02-10 10:08:00 -0800, Wayne Davison wrote:
> On Thu, Feb 10, 2005 at 03:16:44PM +0100, Vincent Lefevre wrote:
> > How can one search for the character "^" in the history (with
> > history-incremental-search-backward)?
> 
> The only way is to not put it as the first character in the search
> string -- i.e. to search for the character prior to the "^" as well
> as the "^" itself.

The problem is that I don't know this character.

> Yeah, that means that there is no way to search for just a "^" in
> zsh's current code. In the future it might be nice to upgrade the
> incremental search to a regex-understanding search like vim uses (it
> treats invalid regex elements as literal strings, so you can eaily
> search for something like "[" or "$" without having to backslash
> it).

Or could zsh be modified so that searching for ^^ (at the beginning of
the search string) is like searching for the ^ character? I doubt that
searching for the ^ character as the first character of a command (as
^^ currently does) is really useful.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-11  0:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-10 14:16 Searching for "^" in the history Vincent Lefevre
     [not found] ` <16907.30377.109401.427969@parhasard.net>
2005-02-10 15:22   ` Vincent Lefevre
2005-02-10 18:08 ` Wayne Davison
2005-02-11  0:09   ` Vincent Lefevre

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).