Re: file .bash_history

Arkadiusz Drabczyk <[email protected]> Wed, 11 Nov 2015 16:42:24 +0000 (UTC)
Newsgroups gmane.linux.slackware
Organization Daddy, why doesn't this magnet pick up this floppy disk?
Message-ID <[email protected]>
On 2015-11-11, Philippe Delavalade <[email protected]> wrote:
> Le mercredi 11 novembre à 14:57, Arkadiusz Drabczyk a écrit :
> (...)
>> Something like this will do the job:
>> 
>> $ PROMPT_COMMAND="history -w; $PROMPT_COMMAND"
>

>> It will not overwrite your current $PROMPT_COMMAND
>
> Yes it does. In .bashrc I have another prompt_command that doesn't work
> anymore. And I want tokeep the old one.

How do you source ~/.bashrc after logging in to tty?  Where did you
put this line?  I use liquidprompt
(https://github.com/nojhan/liquidprompt) that sets its own
$PROMPT_COMMAND.  Yet I am able to use with conjunction with `history
-w'.  I have put this at the end of my ~/.bashrc:

PROMPT_COMMAND="history -w; $PROMPT_COMMAND"

My $PROMPT_COMMAND is:

$ echo $PROMPT_COMMAND
history -w; _lp_set_prompt
-- 
Arkadiusz Drabczyk <[email protected]>


_______________________________________________
slackware mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/slackware