When we write commands especially long ones, we sometimes need to make edits. For example imagine:
docker run --rm --name My_container_3.19.2.9-999_khbdabshs --entrypoint bash registry.me.com:2001/apps/My_container_3.19.2.9-999_khbdabshs
Starting at the beginning of the line by hitting ctrl+a
or end of line by hitting ctrl+e
, how can I quickly get to the word bash
?
Is there a shortcut to jump between docker
run
--rm
--name
My_container_3.19.2.9-999_khbdabshs
--entrypoint
bash
registry.me.com:2001/apps/My_container_3.19.2.9-999_khbdabshs
, which are all seperated by spaces?
I've seen people mention ctrl+b/f
or esc+b/f
but it doesn't exactly do what I want.
I'm using iTerm with ZSH on a macOS. Hopefully the shortcut works irrespective to what emulator or shell I use.