The biggest change I have found for my terminal was adding this to my .bash_profile: export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced I thought that was one of the most amazing things when I used a linux system, but OS X is black and white by default.
OS X Command Line Utilities
161–170 of 243 posts
Re: OS X Command Line Utilities
#162Earlier quoted context omitted.
> Go fullscreen. Not so much for the real estate but for the mental switch. Fullscreen mode is a way to immerse yourself into your productive development world. No browser, no mail, no application notification. Only code. This is an excellent point and one that's not nearly as appreciated as it should be. Fullscreen mode was written off in Lion as an example of Apple dumbing down the platform and making it more like…
I wish fullscreen mode didn't switch to a different desktop. Tabbing out causes this weird "whoosh" animation to play which is so annoying.
Re: OS X Command Line Utilities
#163/usr/local is the default location for user-installed stuff, but I personally like to have my package manager do its stuff in a separate directory. I like the way Fink [1] uses the /sw (software) directory. Does anyone have a valuable opinion on the comparison between Fink and Homebrew — or maybe MacPorts? [1] http://www.finkproject.org
I agree about staying out of /usr/local. I install stuff there -- I don't want my package manager taking it over. That's kept me away from Homebrew.
That said, you can configure homebrew to use any path (check the wiki), you just have to set other environment variables as needed (eg, PATH). For example I'm currently using /opt/homebrew.
(note: a large downside to this is that you have to compile everything and cannot take advantage of Homebrew's pre-compiled "bottles" for some packages)
Re: OS X Command Line Utilities
#164The one utility I can't live without is caffeinate, which prevents a Mac from sleeping. It's super useful for keeping long running tasks running.
Why not just disable sleep? I only ever sleep my Macs manually (if ever).
Re: OS X Command Line Utilities
#165Earlier quoted context omitted.
When i first found out about pushd and popd, i loved them, and used them all the time. These days, i never use them. The way i work now is that i have a bunch of terminal tabs open. Each tab has a shell which pretty much just sits in a single directory. If i need to switch to a different directory, i switch tabs. A nice effect of this is that each tab builds up a recent shell history specific to the directory it sits…
I have the same workflow for switching between tabs, although on Mac the default keyboard shortcut for switching Terminal tabs (Cmd + Shift + '[' or ']') was a little too cumbersome. I swapped it out with (Cmd + '[') which by default will take you to the next Terminal, not tab. I move left to right more, so it made more sense for me. Easy enough to change in system preferences, though. And with using Vim NERDtree, or…
For example, the project I'm working on is always tab 1, pianobar (terminal pandora client) is always tab 4.
This is really nice because it's also how I switch tabs in Chrome. So both Chrome and iTerm have my current work on tab 1.
Re: OS X Command Line Utilities
#166pbpaste and pbcopy can specify multiple clipboards; one very handy thing I do is "cmd-a" "cmd-c" (copy all) double click on a word I'm looking for, "cmd-e" to enter it into the find clipboard 'pbpaste | fgrep --color `pbpaste -pboard find`' I have that aliased as 'pbg'.
Re: OS X Command Line Utilities
#167Earlier quoted context omitted.
> Go fullscreen. Not so much for the real estate but for the mental switch. Fullscreen mode is a way to immerse yourself into your productive development world. No browser, no mail, no application notification. Only code. This is an excellent point and one that's not nearly as appreciated as it should be. Fullscreen mode was written off in Lion as an example of Apple dumbing down the platform and making it more like…
I use sizeup[1] to maximize the terminal (or any other app) with a keystroke, instead of native full screen. It works across all applications that allow window resizing, and has handy shortcuts for "half" full screen, which is great to position, say, a browser and editor next to each other across the whole screen. Which reminds me, I really will go and pay my 13 bucks for it now, it's more than worth it. But the free…
Re: OS X Command Line Utilities
#168Re: OS X Command Line Utilities
#169Re: OS X Command Line Utilities
#170This was supposed to be few lines of remarks. It expanded quickly in relation with my enthusiasm for this topic. I've been investing some time in the command line on my Mac. I am moving from a dilettante going to the shell on a per-need basis to a more seasoned terminal native. It pays off handesomely! It's hard to convey how nice it to have to have a keyboard-based unified environment instead of a series of disjoine…
You can fix that properly in two steps:
1. Create a symlink to your preferred shell. E.g. `sudo ln -s /bin/bash /usr/bin/bash`
2. In Terminal Preferences, use /usr/bin/bash as your shell, instead of the default login shell.
To confirm that you've fixed the problem:
- Open a new terminal window.
- "Last login" should NOT be displayed.
- Hit Command+I to show the inspector. The command should read: login -pfq username /usr/bin/bash.
The -q switch on /bin/login is what speeds things up. (.hushlogin does not solve the problem)
In order to get Terminal to pass the -q switch to /bin/login you have to use a non-standard shell, hence the symlink.