Results 1 to 2 of 2
My situation is basically say you are typing out a long string of command on the terminal. You realize there is a typo in the middle of the command. I ...
- 08-08-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 3
Is there a shortcut key to get to the middle of your command?
My situation is basically say you are typing out a long string of command on the terminal. You realize there is a typo in the middle of the command. I know CTRL + A can bring you to the front, and CTRL + E can bring you to the end. Is there a command that bring you to the middle?
- 08-08-2011 #2
Negative. However if you issue a 'man bash' you can see what is supported for command line moving. Here is a snippet.
<note>I might have missed some other way to do this deeper in the bash man page but didn't see anything.</note>Commands for Moving
beginning-of-line (C-a)
Move to the start of the current line.
end-of-line (C-e)
Move to the end of the line.
forward-char (C-f)
Move forward a character.
backward-char (C-b)
Move back a character.
forward-word (M-f)
Move forward to the end of the next word. Words are composed of alphanumeric characters (letters and digits).
backward-word (M-b)
Move back to the start of the current or previous word. Words are composed of alphanumeric characters (letters and dig‐
its).
shell-forward-word
Move forward to the end of the next word. Words are delimited by non-quoted shell metacharacters.
shell-backward-word
Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters.
clear-screen (C-l)
Clear the screen leaving the current line at the top of the screen. With an argument, refresh the current line without
clearing the screen.
redraw-current-line
Refresh the current line.


Reply With Quote