Tiny Core Extensions > TCE Tips & Tricks
midnight commander - every action is journaled in .bash_history
netnomad:
hi friends,
i use extensively the midnight-commander in the bash started in aterm.
unfortunately every single action in the midnight-commander is included in my ~/.bash_history:
.bash_history:
mc
PROMPT_COMMAND='pwd>&8;kill -STOP $$'
cd "`printf "%b" '\0057home\0057tc'`"
cd "`printf "%b" '\0057home\0057tc\0057\0056fluxbox'`"
cd "`printf "%b" '\0057home\0057tc'`"
cd "`printf "%b" '\0057home\0057tc\0057\0056gconf'`"
so the real important commands are hidden or lost in the bash-history :(
what would you recommend to get rid of that "feature"?
thank you for your help.
althalus:
Hi netnomad,
A quick google search turns up this debian bug report, specifically:
--- Quote ---Here a citate of README.Debian (please read it before filling bugs):
-------------------
- In order to get rid of the commandline history to be full with cd commands
from the both boxes set this environment variable:
export HISTCONTROL=ignoreboth
This is a issue of bash, not of mc. This would fix it.
-------------------
--- End quote ---
(Note: I didn't test that it actually works)
netnomad:
hi althalus,
thanks a lot, it works!
by the way,
could you help me with HISTSIZE, too?
i wasn't able to extend it from 500 to 1000, yet :(
./bashrc
source /usr/local/etc/bashrc
export HISTCONTROL=ignoreboth
export HISTSIZE=1000
thank you for your help.
Rich:
Hi netnomad
Maybe try adding it to .profile?
netnomad:
hi rich,
.profile has no effect for this issue,
only the entry in .bashrc has any effect.
by the way,
export HISTCONTROL=ignoredups,erasedups
has no effect, too.
does someone know whether the syntax
export HISTCONTROL=ignoredups,erasedups
or
export HISTCONTROL=ignoredups:erasedups
is the correct entry?
this is the last version of my
.bashrc
source /usr/local/etc/bashrc
export HISTCONTROL=ignoreboth,erasedups
export HISTSIZE=1000
export HISTFILESIZE=1000000
thank you for your contributions.
Navigation
[0] Message Index
[#] Next page
Go to full version