Sample Header Ad - 728x90

bash or ksh 'vi' mode - How to jump to end of history (most recent command)?

8 votes
1 answer
273 views
I am a long time ksh user, and use bash under duress - both in 'vi' editing mode. One thing that has always niggled - after searching back through history for a command (.e.g /needle), how do I then jump forward through the history again to the most recent command? G would be the logical 'vi' command (i.e. jump to end of file)... but for some reason that jumps to the beginning of the history, i.e. the oldest command. Seeing that, you'd think the opposite might be correct, i.e. 1G, but it seems G commands are not accepted. Does anyone know the trick?
Asked by Annihilannic (318 rep)
Mar 21, 2025, 06:31 AM
Last activity: Mar 21, 2025, 07:08 AM