Recently I found a nice cheat sheet which explains keyboard shortcuts for moving on the current command on the command line, on Linux.
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.