Can I make the right-arrow key fill in an argument-at-a-time from the previous command line?
$ mogrify -resize 50% file.jpg
$
pressing right arrow now should fill in mogrify
, pressing right arrow again should fill in all the way up to mogrify -resize
, if I were to press it again mogrify -resize 50%
etc.
and in the case that the command line so far does not match the directly preceding command line, it should fill in from the most recent matching command
$ mogrify -resize 50% file.jpg
$ echo hi
$ mo
Pressing right arrow should fill in mogrify
not echo
.
how can zsh be configured to support this?