zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Zsh Workers <zsh-workers@sunsite.dk>
Subject: Re: r problem
Date: Thu, 13 Sep 2001 17:52:49 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.33L2.0109131734180.19446-100000@phong.blorf.net> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0109131129400.18383-100000@phong.blorf.net>

On Thu, 13 Sep 2001, Wayne Davison wrote:
> With the advent of my HIST_TMPSTORE flag, I could change the builtins
> to set this value and get rid of the command-line scan.  I'll look
> into this later to see if I think this is a good idea.

It's not.  That would be too much like what we used to have, and the
side-effects of dumping a history entry from inside a builtin function
are not something that I want to revisit.

So, we currently have the problem that I can define a function named "r"
and with HIST_NO_STORE set, invoking that function from the command-line
drops the command from the history.

One potential solution to this would be to change the history-line-drop
code to lookup "r" in a function list and avoid dropping "r" (but not
"builtin r") if we find it.  I don't know the function code well enough
to know if there is an inexpensive call that should_ignore_line() could
call for this or not.

Another solution is to leave things alone and let people use an alias to
redefine "r".  Like this:

    function r_func { echo foo }
    alias r=r_func

That's not as nice, but it works.  Comments?

..wayne..


  reply	other threads:[~2001-09-14  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-12 11:07 Tanaka Akira
2001-09-12 16:03 ` Bart Schaefer
2001-09-13 18:37   ` Wayne Davison
2001-09-14  0:52     ` Wayne Davison [this message]
2001-09-15  4:49       ` Bart Schaefer
2001-09-15  6:26         ` Wayne Davison

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=Pine.LNX.4.33L2.0109131734180.19446-100000@phong.blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=zsh-workers@sunsite.dk \
    /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).