bug-bash
[Top][All Lists]
Advanced

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

history -f filename


From: Dan Jacobson
Subject: history -f filename
Date: Sat, 30 Nov 2024 09:05:18 +0800

$ history
is nice, but what if you want to have it read from a different file?
$ help history
says
    If FILENAME is given, it is used as the history file.  Otherwise,
    if HISTFILE has a value, that is used, else ~/.bash_history.
Alas, it also says
    history: history [-c] [-d offset] [n] or
    history -anrw [filename] or
    history -ps arg [arg...]

So if one wants to use a filename, then one needs to use -anrw (-[anrw]).

So maybe a new -f is needed:
$ history -f filename
to simply read from filename.



reply via email to

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