Odd command line recall problem

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Odd command line recall problem

buggsy2
Latest cygwin64 release as of posting on Windows 7x64
GNU bash, version 4.1.11(2)-release
Running in the cygwin terminal (C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico )

The several commands I use all recall correctly using the up-arrow key. That is, I type a command, it executes, I can recall it via up-arrow. Duplicate commands are collapsed to one command.

However, this command seems to disappear from the history:

tac gman.out | gawk -f ../../findStuckPestJobs.awk

Immediately after issuing the command, up-arrow brings back the command prior to the tac... command.
Further experimentation shows, for instance, that a simple

tac --help

command disappears also. Issuing a history command within the shell doesn't list it!

cygwin problem? Or is this a bash problem?

Reply | Threaded
Open this post in threaded view
|

Re: Odd command line recall problem

Larry Hall (Cygwin)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Odd command line recall problem

Andrey Repin
In reply to this post by buggsy2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Odd command line recall problem

buggsy2
Good idea, right now it's:

xyz:/cygdrive/d/>printenv HISTIGNORE
&:[ \t]*:#*

I'm not sure what all that does. But I don't think it would ignore the tac command.

Andrey Repin wrote
Check your HISTIGNORE ?
Reply | Threaded
Open this post in threaded view
|

Re: Odd command line recall problem

Larry Hall (Cygwin)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Odd command line recall problem

Eric Blake (cygwin)-2
In reply to this post by buggsy2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Odd command line recall problem

buggsy2
Excellent! I unset HISTIGNORE and use HISTCONTROL to remove duplicates. Also learned something about \t. What was in HISTIGNORE must have been the setup default perhaps, though not necessarily from cygwin, it might be from another bash shell setup.

Eric Blake-3 wrote
On 12/18/2013 04:42 PM, buggsy2 wrote:
> Good idea, right now it's:
>
> xyz:/cygdrive/d/>printenv HISTIGNORE
> &:[ \t]*:#*

This says:

ignore duplicate commands,
ignore any command starting with space, backslash, or t,
ignore any comment

and tac starts with 't'.