Tiny Core Extensions > TCE Tips & Tricks

midnight commander - every action is journaled in .bash_history

<< < (2/2)

curaga:
man bash says to use colons, ":".

netnomad:
hi rich,

thank you, you are right,
but

.bashrc
source /usr/local/etc/bashrc
export HISTCONTROL=ignoreboth:ignoredups:erasedups
export HISTSIZE=1000
export HISTFILESIZE=1000000

has still no effect on the dups:(

.bash_history
mc
exit
exit
ls
exit
mc
ls
exit

althalus:

--- Quote from: netnomad on November 20, 2012, 03:29:11 PM ---export HISTCONTROL=ignoreboth:ignoredups:erasedups

--- End quote ---

Try this:

HISTCONTROL="ignorespace:erasedups"

No noise from mc, and no dups in my bash history.

The wording for HISTCONTROL suggested to me that cramming all the options together causes some sort of conflict. Testing seems to confirm that my thinking is heading in the right direction.

--- Quote ---
       HISTCONTROL
              A colon-separated list of values controlling how commands are saved on the history list.  If the list of values includes ignorespace, lines
              which begin with a space character are not saved in the history list.  A value of ignoredups causes lines  matching  the  previous  history
              entry  to not be saved.  A value of ignoreboth is shorthand for ignorespace and ignoredups.  A value of erasedups causes all previous lines
              matching the current line to be removed from the history list before that line is saved.  Any value not in the above list is  ignored.   If
              HISTCONTROL  is  unset, or does not include a valid value, all lines read by the shell parser are saved on the history list, subject to the
              value of HISTIGNORE.  The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardā€
              less of the value of HISTCONTROL.

--- End quote ---

netnomad:

--- Quote ---No noise from mc, and no dups in my bash history.

--- End quote ---

hi friends,

i didn't succeed with the "no dups" :(
although i checked ~/.ashrc, ~/.bashrc and ~/.profile and tried so many different configurations...
i even changed the /usr/local/etc/bashrc,
but at least the noise is gone :)

thank you for your help.

Navigation

[0] Message Index

[*] Previous page

Go to full version