I have typed out a long command in the BASH but just as I typed the command I see that I have misspelled the command or argument. I want the cursor to go to the argument or command I have misspelled using inplace search instead of hitting arrow keys to go to the particular command or argument.
ls *.txt | grep -e 'foo' >> list_of_text_files_containing_foo.txt
and I want to change
foo in grep to
bar by find and replace
bar inside the command without hitting arrow keys. Is there a way to change all occurrences of