When I speak of 'command history', I speak of being able to press the <up> or <down> keys to retrieve the last command entered into the terminal—even after the session has been ended. Currently, I have no way to retrieve the past commands via <up> and <down> arrow keys, which is quite costly for me. I've endured this for a few months, and now it's time to fix it if possible.
I've checked the man pages. I've scoured the net with several different search terms. There is info on ksh and other shells, but I've yet to find any info on mksh specifically.
I should add that the history works fine while in a session, but once I exit and reenter the mksh shell, they are gone; the arrow keys bring up nil. I want such to persist if possible.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Command history in mksh shell?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Command history in mksh shell?
Code: Select all
set -o emacs
Set $HISTFILE to maintain a persistent history.
deadbang
Re: Command history in mksh shell?
Thanks. Working great now!Head_on_a_Stick wrote:^ Add that to ~/.mkshrc (or copy the supplied example mkshrc over to $HOME).Code: Select all
set -o emacs
Set $HISTFILE to maintain a persistent history.