You are not logged in.
Pages: 1
I would like to unset the bash history function
set +o history
This does what I want, but is only a temporary measure. Something else enables the history functionality (ie: unset history, call up xterm, history is enabled.)
I've tried putting the above code into .bash_profile , /etc/profile , and .bashrc. Hmmmm....
:?:
Offline
When the shell starts up, the history is initialized from the file named by the HISTFILE variable (default `~/.bash_history'). The file named by the value of HISTFILE is truncated, if necessary, to contain no more than the number of lines specified by the value of the HISTFILESIZE variable. When an interactive shell exits, the last $HISTSIZE lines are copied from the history list to the file named by $HISTFILE. If the histappend shell option is set (see section 4.2 Bash Builtin Commands), the lines are appended to the history file, otherwise the history file is overwritten. If HISTFILE is unset, or if the history file is unwritable, the history is not saved. After saving the history, the history file is truncated to contain no more than $HISTFILESIZE lines. If HISTFILESIZE is not set, no truncation is performed.
http://www.faqs.org/docs/bashman/bashre … tml#SEC113
don't know if that helps or not.
you could also compile bash without such support, and install it as an alternate shell maybe (bash-nohist).
http://www.network-theory.co.uk/docs/ba … f_113.html
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Thanks cactus,
I read over what you posted, it seems the trick is to unset the HISTFILE (or make it unreadable).
Here are some hacks I have thought of:
set HISTFILE=/dev/null
or
set HISTSIZE=0
I have been using the latter - it works. (but its just a hack, I'm sure there is a better way to go about this)
Thanks again.
Offline
I use:
$ ln -s /dev/null ~/.bash_history
Offline
Pages: 1