When I iterate over previous commands in bash history, cursor position always jumps at the end of the command. I want some way of remembering current cursor position of last executed command.
This can be useful when trying different command line options for some command. Now I have to press
up key and move cursor backwards to where the option was typed to edit it. I want to eliminate this second step if it is possible.
I am using bash, but solutions for other shells are also interesting.