Live data from Hacker News

OS X Command Line Utilities

mitchchn.me

121–130 of 243 posts

Re: OS X Command Line Utilities

#121
post #120

Could you imagine Apple would have gone for BeOS or a custom developed kernel with no significant terminal-based userland when making OS X? It would probably still be used by many casual users or those doing graphical work, but I doubt it would be used by hackers at all.

I believe they considered Windows NT at one point. Can you imagine using NT's fake DOS terminal? Ugh.

Re: OS X Command Line Utilities

#122

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…

I noticed your main editor is emacs? I consider myself a Terminal Native as well, but why dont you like using GUI Emacs and Eshell/m-x Shell instead?

Re: OS X Command Line Utilities

#123

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…

Why don't you just exclusively use something like Arch Linux

Re: OS X Command Line Utilities

#124
post #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.

It might be parsing through logs to find out last login information.

So, like any unix os, ensure you do this:

touch $HOME/.hushlogin

That will short circuit that stuff. Like you said I've not had issues with terminals opening fast but it can't hurt. I don't give a rats when I last logged in on any unix os I log into.

Re: OS X Command Line Utilities

#125

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…

As for symlinks from your home: I prefer to add aliases for directories I move to a lot. For example:

alias cdss='cd /Users/username/somewhere1/somewhere2'

then I just go 'cdss' to get there from anywhere.

Re: OS X Command Line Utilities

#126

Earlier quoted context omitted.

Why split your terminal if you have screen / tmux?

iterm has special integration with tmux. The big advantage is that you can quickly scroll the history with the mouse which is way faster and more convenient that going back up screen by screen with a shortcut. Also with some work you can synchronize the OSX clipboard with tmux's one.

I scroll using the mouse in tmux all the time in any mouse capable terminal (aka not Terminal.app, also regular linux terms).

I have a toggle to turn it on off in my tmux.conf, have a looky: https://github.com/mitchty/src/blob/master/dotfiles/tmux.con...

Re: OS X Command Line Utilities

#127
post #36

I didn't know about `screencapture`. That's a fun one. The Linux equivalent of `open` is `xdg-open`. I usually alias it to `op`, since `/bin/open` exists. Another bit of terminal-sugar for OS X users: alias lock='/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend' And most Linux users: alias lock='gnome-screensaver-command -l' If you find yourself accidentally triggering hot co…

cmd+shift+eject

Re: OS X Command Line Utilities

#128

Another thing you can do to improve speed is learn the keybindings for readline. They are the same keybindings as emacs, and lots of other things use readline too like python shell, sqlite, etc. A very useful set of keys to have in your muscle memory. See the readline manual: http://tiswww.case.edu/php/chet/readline/rluserman.html#SEC3

if your a vi/vim user in you're .inputrc set:

    set editing-mode vi
    set keymap vi-command
see more settings @ https://github.com/shawndumas/dotfiles/blob/master/readline/...

Re: OS X Command Line Utilities

#129
post #107

After years of living on the command line, OS X specifically, and learning its quirks and tricks, I am actually ready to move on. Right now I am more interested in creating simple visual interfaces on top of UNIX-y tools, for my own personal use cases. The main benefit of this is the ability to better experiment with and optimize my workflows for different properties as needed through different combinations of single…

Why do you think that having a visual interface will make it easier to experiment with your workflow? This is a genuine question - personally, i find command line interfaces to be far more hackable than graphical ones, so i would expect the opposite to be true, and hence i'm interested in your perspective.

Not the parent, but personally I can't remember the huge list of available Unix commands. Every time I want to do something outside my normal workflow, I end up in google. For me, "Google + man page + command line" is slower than a nice GUI optimized for specific tasks. The hard part is designing this mythical nice GUI.

Re: OS X Command Line Utilities

#130

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…

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 Emacs for a long time there's no reason to do it in a terminal. I always used the GTK or the Athena version.
Post reply on HN