Recently I found a nice cheat sheet which explains keyboard shortcuts for moving on the current command on the command line, on Linux.

Linux command line cheat sheet by clementc.github.io
Sadly it doesn’t work out of the box on MacOS, but it’s super easy to have this functionality on iTerm2! The trick is enabling left option key to act as meta key.