Say I have written the following command but haven't yet pressed enter to execute it:
$ ls dir1 dir2 dir3
Is there a way to replace given characters without manually changing them in every location they are? For example, I'd like to press some shortcut, enter string to be replaced (say,
dir) and then enter another string as its replacement (say 'directory`).