/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.
OS X Command Line Utilities
181–190 of 243 posts
Re: OS X Command Line Utilities
#182It seems odd to have open /Applications/Safari.app/ as an example, when open -a safari does the same thing.
Except that the first one is supported by TAB-completion.
Re: OS X Command Line Utilities
#183Re: OS X Command Line Utilities
#184This 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…
parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^]/d' -e 's/ \(.*\)/(\1)/' }
export PS1="\u@\h \[\033[32m\]\$(parse_git_branch)\[\033[00m\] \W $ "
Re: OS X Command Line Utilities
#185Earlier quoted context omitted.
iTerm2 does vertical and horizontal splitting better than Terminal.app. tmux does vertical and horizontal splitting better than screen. That's my rationale for using iTerm2 and tmux instead of Terminal.app and screen. (yes, I'm aware that screen has improved its splitting recently, but I switched to tmux in 2011, after seeing a presentation about it by Nicholas Marriott)
Why split your terminal if you have screen / tmux?
Re: OS X Command Line Utilities
#186Earlier quoted context omitted.
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.
It does bother me that Homebrew advocates using /usr/local, that is a choice that needs justification and I don't believe they offer anything convincing. 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 c…
Re: OS X Command Line Utilities
#187Earlier quoted context omitted.
Look into getting Emacs in one of its native OS X incarnations rather than using it in the terminal. Emacs is going to have a lot more options for colors (font locking is the Emacs-speak, I think) in its own app than when it's boxed into a terminal. You also get support for multiple "frames" (windows); Vim can't do this at all and I still miss that from Emacs. I use Linux rather than OS X but if you are parked in Ema…
Vim can absolutely do multiple "frames". They're called splits.
One Vim session can live only in one window that is managed by the system window manager. You cannot have multiple windows that talk to each other. You can split a single window manager window using ":split" and the like. Vim calls these "windows". You can have multiple tab pages, each of which holding multiple Vim windows, but all these tab pages must reside in a single system window-manager window.
Vim has a help file somewhere saying that Bram Moolenaar knows this is a problem and it's on the todo list.
Re: OS X Command Line Utilities
#188Re: OS X Command Line Utilities
#189My favorite command is 'say'. You can do all kinds of silly voices. Try this out: say hello -v Good
For anyone wondering, you can also do this: say -v '?' (This gives you a list of voices) say -v Good (This let's you type in a stream of text)
Re: OS X Command Line Utilities
#190Earlier quoted context omitted.
> You can make the terminal start instantaneously instead of it taking several seconds. Terminal has started instantaneously on all my Macs for years, since the advent of SSDs. A tiny fraction of a second. If it is taking several seconds to launch, I think something must have gone haywire somewhere.
A friend of mine was experiencing multiple-second launches for Terminal. When he looked, he saw that it was occupying about 1 GB of memory. Turns out the option to maintain ALL HISTORY EVER as scrollback was turned on. So he had the last year of compiler output and whatnot stored in a file somewhere, getting loaded into memory the first time he launched Terminal after a boot, and then eating a big chunk of his laptop…
I leave Scrollback limited to "available memory", which I assume is what you're referring to, but I also compulsively hit ⌘K to clear my scrollback.