public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: go through duplicate commands
@ 2019-05-23 18:59 A GS
  2019-05-24  2:17 ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: A GS @ 2019-05-23 18:59 UTC (permalink / raw)
  To: cygwin

The option is already in the .bashrc (though commented) of my version.
Neat. Might be the default aswell.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: go through duplicate commands
  2019-05-23 18:59 go through duplicate commands A GS
@ 2019-05-24  2:17 ` Brian Inglis
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Inglis @ 2019-05-24  2:17 UTC (permalink / raw)
  To: cygwin

On 2019-05-23 12:59, A GS wrote:
> The option is already in the .bashrc (though commented) of my version.
> Neat. Might be the default aswell.

$ info bash HISTCONTROL

If history is enabled by set -o history, the default action if HISTCONTROL is
unset or null, saves all instances of all commands, except those excluded by
patterns in the HISTIGNORE list, up to the limit specified by HISTSIZE, default
500.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: go through duplicate commands
  2019-05-21 16:18 ` Eric Blake
@ 2019-05-22  5:46   ` Brian Inglis
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Inglis @ 2019-05-22  5:46 UTC (permalink / raw)
  To: cygwin

On 2019-05-21 10:17, Eric Blake wrote:
> On 5/21/19 11:10 AM, A GS wrote:
>> What about making "up" go through duplicate commands? I think this is the behaviour on some linuxes but I don't know the specifics. That would be neat.
> 
> 'info bash HISTCONTROL'
> 
> It sounds like you are asking for the Cygwin /etc/profile (or the
> skeleton .bashrc file) to be tweaked to add a HISTCONTROL=ignoredups so
> that new installations automatically turn on that feature of bash.  But
> in the meantime, you can modify your own ~/.bashrc to turn it on for
> yourself.

To get the result you probably expect set "HISTCONTROL=ignoreboth:erasedups"

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: go through duplicate commands
  2019-05-21 16:10 A GS
@ 2019-05-21 16:18 ` Eric Blake
  2019-05-22  5:46   ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Blake @ 2019-05-21 16:18 UTC (permalink / raw)
  To: cygwin, esotopia


[-- Attachment #1.1: Type: text/plain, Size: 644 bytes --]

On 5/21/19 11:10 AM, A GS wrote:
> What about making "up" go through duplicate commands? I think this is the behaviour on some linuxes but I don't know the specifics. That would be neat.

'info bash HISTCONTROL'

It sounds like you are asking for the Cygwin /etc/profile (or the
skeleton .bashrc file) to be tweaked to add a HISTCONTROL=ignoredups so
that new installations automatically turn on that feature of bash.  But
in the meantime, you can modify your own ~/.bashrc to turn it on for
yourself.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* go through duplicate commands
@ 2019-05-21 16:10 A GS
  2019-05-21 16:18 ` Eric Blake
  0 siblings, 1 reply; 5+ messages in thread
From: A GS @ 2019-05-21 16:10 UTC (permalink / raw)
  To: cygwin

What about making "up" go through duplicate commands? I think this is the behaviour on some linuxes but I don't know the specifics. That would be neat.

ls -a
ls
ls

This would go from ls to ls -a in one (not two) "up"s.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-24  2:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 18:59 go through duplicate commands A GS
2019-05-24  2:17 ` Brian Inglis
  -- strict thread matches above, loose matches on Subject: below --
2019-05-21 16:10 A GS
2019-05-21 16:18 ` Eric Blake
2019-05-22  5:46   ` Brian Inglis

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 read-only IMAP folder(s) and NNTP newsgroup(s).