Live data from Hacker News

OS X Command Line Utilities

mitchchn.me

71–80 of 243 posts

Re: OS X Command Line Utilities

#71
post #5
post #3

My 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)

A newer trick (as of Mavericks) is that say can also highlight words while reading text:

   say --interactive=/green spending each day the color of the leaves

Re: OS X Command Line Utilities

#73

This 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…

Don't need symlinks. Just set the CDPATH environment variable!

Also set up case insensitive completion, saves the extra shift press for all those Mac paths.

Re: OS X Command Line Utilities

#74

This 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…

> - Install iterm2. The main reason to use it >instead of the default Terminal application is that It just works©.

What's wrong with the default Terminal application? I use it daily and have been for close to a decade. I never found myself wishing it did anything than what it already does.

> -Use tmux.

Meh. For most people screen works just as well. Perhaps more importantly, you can rely on screen being available pretty much anywhere. Just like vim. Speaking of which: vim is great. Use vim. The world needs more vim.

Re: OS X Command Line Utilities

#75

This 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…

> 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

#77

This 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…

> 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…

Also great if starved of screen space.

Re: OS X Command Line Utilities

#78
post #59

Earlier quoted context omitted.

Homebrew actually uses /usr/local/Cellar for all its installations, and then makes symlinks in the relevant /usr/local/{bin,sbin} directories. Not sure if that's what you meant.

Thanks for the clarification. Still, a quick Google search seems to indicate that this does not solve all related problems (symlinking, overriding, etc.).

Brew does refuse to link anything that would collide, and it knows to not link e.g. gettext, as a lot of Mac programs rely on BSD gettext

Re: OS X Command Line Utilities

#79

This 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 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.

Re: OS X Command Line Utilities

#80
post #40

What always surprises me is that so many don't know or use the directory stack commands, pushd and popd. I'll admit I was also ignorant of them until something like 2005, but once I learned of them I switched and never looked back. Now I can't see someone write or type "cd" without a little bit of a cringe.

A related trick is to use parentheses to create a subshell, in the case where you have a fixed command sequence you want to execute in another directory but you don't want to stay there: $ pwd /tmp $ mkdir -p a/b/c $ ( cd a/b/c ; pwd ) /tmp/a/b/c $ pwd /tmp

This is probably the thing I’m missing the most in fish shell.
Post reply on HN