Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Move the Terminal cursor position with the mouse' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Move the Terminal cursor position with the mouse
Authored by: baltwo on Jan 29, '14 12:57:13PM

Then, there are these:

Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names



[ Reply to This | # ]
Move the Terminal cursor position with the mouse
Authored by: robleach on Jan 30, '14 09:37:10AM

I assume these must be shell-specific, because in tcsh, I note these differences:

^w - Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
^d - End of input character (e.g. use if running something like `cat > file`)
option-left-arrow - Move cursor backward one word on the current line
option-right-arrow - Move cursor forward one word on the current line
(option-f & option-b insert special characters)

I tried these in bash and also note some differences:

option-left-arrow - Move cursor backward one word on the current line
option-right-arrow - Move cursor forward one word on the current line
(option-f & option-b insert special characters)
^d - deletes characters forward

Rob



[ Reply to This | # ]
Move the Terminal cursor position with the mouse
Authored by: keirthomas on Jan 31, '14 12:21:09AM

Yeah, those shortcuts he gave are pretty much BASH/emacs. People can just look-up those online if they want clues as to shortcuts (or just look in the man pages), and they're not OS X-specific, obviously.

---
Author of Mac Kung Fu
Over 400 tips, tricks, hints and hacks for OS X
My tips blog: http://mackungfu.org



[ Reply to This | # ]