Omitting immediate duplicates as default seems reasonable to me.
It would be simple, and need no additional external controls. Nice.

Defining the beaviour through some means (env var or something)
would allow more control variants; like omitting duplicates even if
not adjacent in the file - the latter needs some more sophisticated
implementation though. Or allow extensions to any of zsh's options
(if considered useful).

Beyond "no immediate duplicates" and "no duplicates at all" I'd have
no need, but others might have, and it might be good to not rule out
other options.


Date: Fri, 3 Jan 2014 17:35:50 -0500
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [ast-users] Configuring what goes into the history file

Since all HISTCONTROL does is eliminate immediate duplicates or no keep 
commands that start with a space, I don't know why this can't be the default 
behavior.
Ignoring failed commands seems like a bad idea.  Failed command often occur 
because of a typo and in this case I want to edit the failed command.


On Thu, Jan 2, 2014 at 8:47 PM, Ed Horch <[email protected]> wrote:

What bash does is a good start.  I've always wanted a more powerful way to 
exclude certain things from the command history, especially erroneous and 
failed commands.  I haven't been able to think of a good way to specify that.  
For example:




$ cat ~/.kshcr
cat: /home/ebh/.kshcr: No such file or directory

That shouldn't go into the history.  But what about:

$ cat ~/.kshrc
cat: /home/ebh/.kshrc: No such file or directory



$ echo 'alias l=ls\ -xF' >~/.kshrc
$ # Would like to do M-PM-P here

Maybe some "keep-previous-command-anyway" editing function or some such.



-Ed Horch


_______________________________________________

ast-users mailing list

[email protected]

http://lists.research.att.com/mailman/listinfo/ast-users





_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users                        
                  
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to