Re: file .bash_history
Philippe Delavalade <[email protected]> Thu, 12 Nov 2015 08:46:24 +0100
| Newsgroups | gmane.linux.slackware |
|---|---|
| Message-ID | <20151112074624.GA1245@messier31> |
Le mercredi 11 novembre à 17:42, Arkadiusz Drabczyk a écrit : > 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 Hi. I resolved the problem ; my own prompt_command was a function ; so, I include your history comand in that funcion _prompt_command and all is OK now. Many thanks. -- Ph. Delavalade _______________________________________________ slackware mailing list [email protected] https://mailman.lug.org.uk/mailman/listinfo/slackware