help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: history -s in ~/.bashrc mystery


From: Chet Ramey
Subject: Re: history -s in ~/.bashrc mystery
Date: Sat, 30 Oct 2021 14:26:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1

On 10/29/21 11:14 PM, Budi wrote:
Found that to meaning to add few command history by history -s in
~/.bashrc, is to clean or not
  to load ~/.bash_history as the list is only that added lines

Though it's solved e.g. by history -r; history -s foo' history -s bar,
why is it so is still mystery

It's explicit and has been that way since bash-2.05. Loading the history
list takes place after reading the startup files, and you don't want to
overwrite any history entries that the startup files added.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]