Re: history builtin with no HISTFILE

2023-08-02 Thread Chet Ramey
On 8/2/23 1:23 PM, Grisha Levit wrote: On Wed, Aug 2, 2023, 10:45 Chet Ramey wrote: On 7/27/23 10:16 PM, Grisha Levit wrote: If the `history' builtin is used with no filename argument and the HISTFILE variable is unset, the Readline default history file ~/.history is used. It makes sense to

Re: history builtin with no HISTFILE

2023-08-02 Thread Grisha Levit
On Wed, Aug 2, 2023, 10:45 Chet Ramey wrote: > > On 7/27/23 10:16 PM, Grisha Levit wrote: > > If the `history' builtin is used with no filename argument and the HISTFILE > > variable is unset, the Readline default history file ~/.history is used. > > It makes sense to use some default filename if

Re: history builtin with no HISTFILE

2023-08-02 Thread Chet Ramey
On 7/27/23 10:16 PM, Grisha Levit wrote: If the `history' builtin is used with no filename argument and the HISTFILE variable is unset, the Readline default history file ~/.history is used. It makes sense to use some default filename if the user explicitly asks for the history to be read or wri

history builtin with no HISTFILE

2023-07-27 Thread Grisha Levit
If the `history' builtin is used with no filename argument and the HISTFILE variable is unset, the Readline default history file ~/.history is used. $ rm -f ~/.history $ bash -c 'history -s foo; history -w' $ cat ~/.history foo The help text states: If FILENAME is given, it is used as the hi