bash - have too much history recorded
What I think are the relevant sections of my .bashrc:
Code:
shopt -s histappend Code:
shopt -s histappend Am I declaring shopt once too often. And I can't seem to find the -a tag in the history man pages. I remember adding some lines to my .bashrc that returned only stdout commands, not lines from the last script I've used, and that's what I'm looking to have again. Thanks in advance. Carver |
history is a bash built-in, so you need to check man bash and look for history within.
Code:
-a Append the ``new'' history lines to the history file. These are history lines entered since the |
or 'help history'
|
Quote:
Here is my complete .bashrc: Code:
# ~/.bashrc: executed by bash(1) for non-login shells. Carver |
You have:
Code:
PROMPT_COMMAND="history -a; $PROMPT_COMMAND" Code:
PROMPT_COMMAND='history -a;history -n' My /etc/bashrc (sourced by ~/.bashrc) has Code:
# Turn on parallel history My CLI commands are saved to history at each normal close of my terminal sessions. I lose current session history if the session closes abnormally. I'm not sure why the lines of a script would be captured in history, tho. Just thought the PROMPT_COMMAND manipulation looked "overboard" |
I assume, you want to record all bash commands. Here's what I have in /etc/profile:
Quote:
|
Quote:
|
All times are GMT -5. The time now is 07:45 AM. |