David Montgomery 09 Apr 2010
I find I spend a lot of time on the command line using svn. It`s good to know these simple shortcuts that at the end of the day makes life easier. Of course there are more out there, but for me I can`t live without these ones.
Yes, I have to admit it. I have always been jealous of those guys on their PC's while working on the command line. With a quick double click to a path anywhere, a click of the middle mouse button and bam, it gets pasted at your current focus. On a Mac you can`t do this so easily. But there is a way...
I hope this has been helpful. Do you have any other "gems" that can make workflows more efficient on the command line? let us know. Your comments are always appreciated.
Read the next post - Javascript Drop Shadows
3 comments submit a comment
Lance
Kind of a shortcut, adding common paths (EG mysql) to your profile on a Mac. The less I have to type the better...
edit the file: /etc/profile and update the path by adding:
usr/local/mysql/bin/
for example:
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin"
From: http://www.comentum.com/mysql-administration.html
Tim Higgs
Hey Dave. Just thought I'd make mention of a couple of things. Your first shortcut is a Mac OS X terminal shortcut; the rest are shell shortcuts (so tsch or bash etc...). An alternative to the "command k" / "clear screen" command is "ctrl l" - which works for several shells ("command k" kills scroll history too).
Some additional shell shortcuts (that work in a few different shells) that are really useful:
- 'ctrl k' : cut from cursor to end of line (puts into cut / paste buffer)
- 'ctrl y' : paste from buffer (will also paste text cut with 'ctrl u')
- 'ctrl a' / 'ctrl e' : move to start / to end of line
- 'esc' then 'delete' : cut one word (which of course can then be pasted)
- 'esc' then 'l' / 'c' / 'u' : make the following word lowercase / capitalised / uppercase
Handily, a bunch of these shortcuts work in a variety of text editors, such as EMACS
Dave
Hey Thanks Tim, great stuff, really useful!