I've never really spent much time making use of history, but it's time to try and get familiar with it.
I know I can scroll through my history with the up/down arrow keys, but I'd like to be presented with a scrollable history list from which I could make a selection. I'm sure I have used such a thing but can't remember where.
It looks like the shell you use has quite a bearing on how you handle history. Looking through various guides, it suggests that using '!' with a number will invoke the command corresponding to that position in your history, but that doesn't seem to work with 'sh'. Is there a way to do that in 'sh'?
has some info on history and mentions things like 'fc -e - d' but I don't see any explanation of how this works.
Does anyone know of a guide?
I know I can scroll through my history with the up/down arrow keys, but I'd like to be presented with a scrollable history list from which I could make a selection. I'm sure I have used such a thing but can't remember where.
It looks like the shell you use has quite a bearing on how you handle history. Looking through various guides, it suggests that using '!' with a number will invoke the command corresponding to that position in your history, but that doesn't seem to work with 'sh'. Is there a way to do that in 'sh'?
history
man.freebsd.org
has some info on history and mentions things like 'fc -e - d' but I don't see any explanation of how this works.
Does anyone know of a guide?