zsh-workers
 help / color / mirror / code / Atom feed
From: schaefer@z-code.ncd.com (Barton E. Schaefer)
To: Zefram <A.Main@dcs.warwick.ac.uk>, jdl@clinicom.com (J.D. Laub),
	zsh-workers@math.gatech.edu
Subject: Re: zsh, vi mode, vihistorysearchbackward
Date: Wed, 19 Jun 1996 11:58:07 -0700	[thread overview]
Message-ID: <960619115807.ZM20491@zyrcon.z-code.com> (raw)
In-Reply-To: Zefram <A.Main@dcs.warwick.ac.uk> "Re: zsh, vi mode, vihistorysearchbackward" (Jun 19,  6:04pm)

On Jun 19,  6:04pm, Zefram wrote:
} Subject: Re: zsh, vi mode, vihistorysearchbackward
}
} >I can see how "/" should seem to be "search forward" and "?" should be
} >"search backward", but this works exactly opposite as it did before.
} 
} We are trying to emulate vi, rather than ksh.  As a vi user, I find the
} new bindings much more intuitive -- ? is a backward search, so that's
} what I use to search backward through the history.

In point of fact, I never in memory have *ever* wanted to search forward
through the history.  (If I had my druthers, *any* search other than an
immediate repeat of the previous search would always start at the current
command (the end of the history) and go backwards; treating the history
as if it were a file being edited makes no sense to me at all.)  I think
the ksh behavior is more intuitive, because I don't think of history as
existing in more than one direction; so having two commands to search it
is confusing enough to begin with.

Further, it's really confusing to have ESC-/ fail to find something that
you know you typed only moments before.  If `/' isn't going to search
backwards, then it at least ought to wrap around (like "wrapscan" in vi).

I don't use vi mode, so I haven't bothered complaining about it before.

} If you really want to have the default state match ksh, give everyone a
} .zshrc including these bindings.

Is there a way to tell from within the shell that it was invoked as ksh?
Perhaps an /etc/zshenv like this:

    if [[ -o interactive && $0 = *ksh ]]
    then
	bindkey -a / vi-history-search-backward
	bindkey -a \? vi-history-search-forward
    fi

-- 
Bart Schaefer                     Vice President, Technology, Z-Code Software
schaefer@z-code.com                   Division of NetManage Corporation
http://www.well.com/www/barts           http://www.ncdsoft.com/ZMail/



  parent reply	other threads:[~1996-06-19 19:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-19 16:44 J.D. Laub
1996-06-19 17:04 ` Zefram
1996-06-19 18:01   ` Hrvoje Niksic
1996-06-19 19:21     ` Zefram
1996-06-19 18:58   ` Barton E. Schaefer [this message]
1996-06-19 22:47   ` Richard Coleman
1996-06-20  0:10     ` Vinnie Shelton

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=960619115807.ZM20491@zyrcon.z-code.com \
    --to=schaefer@z-code.ncd.com \
    --cc=A.Main@dcs.warwick.ac.uk \
    --cc=jdl@clinicom.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).