zsh-workers
 help / color / mirror / code / Atom feed
From: Derek Peschel <dpeschel@eskimo.com>
To: zsh-workers@sunsite.dk
Subject: controlling what goes in the history, or editing history in place?
Date: Sat, 9 Feb 2002 14:47:20 -0800	[thread overview]
Message-ID: <20020209144720.A3692@eskimo.eskimo.com> (raw)

Hi everybody,

I have all sorts of evil ideas for tweaking the history mechanism,
but it doesn't seem to be flexible enough for some of them.

- Is it possible to have some commands not be put into the internal
  history list, or not be saved when the list gets dumped to the .history
  file?

- Is it possible to scroll back to a previous command, change the line,
  and have the old history entry change?  (As opposed to creating a new
  history entry.)  Or is it possible to delete the old history entry?

As far as I can tell, things go into the history and then may be removed
by the various HIST... options.  It might be more useful (when writing
lots of extensions) to have things NOT go into the history unless
explicitly allowed.

BTW, some of the evil ideas are:

- If a command caused a syntax error, keep it in the internal history
  but don't save it to the .history file.

- A scheme to save sequences of commands in the history, so that you
  type the first one and then can go automatically through the rest
  (the infer-next zle widgets could do that, though they would need
  to know where the sequences end).

- Ditto with some kind of automatic pattern-matching predictor (if you
  did "ls a" followed by "rm a", then "ls b" sometime later, your next
  command might well be "rm b").  Yes, I realize this is incredibly
  dangerous.  Maybe the commands could be stuffed into the zle buffer
  instead of just being inserted at the prompt.

The point is to make the history a more specialized and intelligent tool,
not just an undifferentiated list.  BTW I'd rather have shell functions
than a huge number of specialized options.

-- Derek


                 reply	other threads:[~2002-02-09 22:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020209144720.A3692@eskimo.eskimo.com \
    --to=dpeschel@eskimo.com \
    --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).