Tag Archives: terminal

Syntax highlighting in less on osx | Putting the fun into Funkworks

To get lovely syntax highlighting in the OSX terminal (for seeing the output of ‘less’ nicely):

$ brew install source-highlight 

Add these your .profile or appropriate dotfile (.bash_profile, .zshrc)

LESSPIPE=`which src-hilite-lesspipe.sh`

export LESSOPEN="| ${LESSPIPE} %s"

export LESS='-R'

 

Source: Syntax highlighting in less on osx | Putting the fun into Funkworks

New Terminal at Folder

In the past it could be a chore to open a new terminal window at the folder you were in. Even using a launcher such as Quicksilver, you had to manually navigate to where you already should be.

In the new App Store, I noticed a little free app called Go2Shell. You could either place this in the finder window toolbar for click access, or just invoke it from your launcher whilst wherever in your folder structure.

With Lion, while looking through Notational Velocity info, I came upon a new (to me, at least) way to do the same via the Services menu – for those of that particular bent. (If you happen to be, then you already know you can set up a hotkey for any service to avoid the trouble of an unnatural right-click of the mouse). This setting is at:

System Preferences > Keyboard > Keyboard Shortcuts > Services > Files and Folders > New Terminal at Folder

It also allows you to open a new tab in your current terminal right here if you’re the sort who just keeps it open all the time. I selected both to see if it would be aware of the terminal running status and found that if it’s not running only the New Terminal option is available.

Go2Shell still is a great non-fiddly option and I’ll keep it installed. If you have some curiosity, you might go through all those shortcuts and see what gems may be hidden away.

update: geesh … it took me hours to absently use this Go2Shell before i got “it”. slowwww ammm ayeeee.