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

Re: Searching for "^" in the history

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@xxxxxxxxxx> - 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

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