OS X Command Line Utilities
211–220 of 243 posts
Re: OS X Command Line Utilities
#212Earlier 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
#213Personally, I was surprised that there is not a command line interface to OS X's Notification system. Seems like it would be handy for long running batch jobs.
https://github.com/alloy/terminal-notifier
Add this to your .bashrc:
function notify { terminal-notifier -title "$1" -message "$2" }
Re: OS X Command Line Utilities
#214This 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 pre…
> Speaking of which: vim is great. Use vim. The world needs more vim.
Agreed :)
Re: OS X Command Line Utilities
#215Earlier 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…
Although, now ripter has taught me that ⌘1 etc select tabs (i also use iTerm), i hope i'll switch to using that.
Re: OS X Command Line Utilities
#216Why the hell would someone change the title from "Eight Terminal Utilities Every OS X Command Line User Should Know" to "OS X Command Line Utilities". The original title is clearly more accurate / useful / canonical. The overwritten title is ambiguous. This is indeed not a list of every OS X command line utility.
Re: OS X Command Line Utilities
#217I 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…
Re: OS X Command Line Utilities
#218Personally, I was surprised that there is not a command line interface to OS X's Notification system. Seems like it would be handy for long running batch jobs.
Install this: https://github.com/alloy/terminal-notifier Add this to your .bashrc: function notify { terminal-notifier -title "$1" -message "$2" }
Re: OS X Command Line Utilities
#219Earlier quoted context omitted.
Quicksilver is similar to Alfred in intent and quite featureful/customizable. It is open source. https://github.com/quicksilver/Quicksilver
Quicksilver used to be great, but then the main developer went to work on some dead end project for Google and abandoned Quicksilver. Is the project still alive? It's too late for me anyway - I have moved to Alfred, the new kid on the block at the time, and like it much more (much less clutter). Plus, I can't trust the QS developer anymore after he's abandoned the project once.
I know because I regularly see "Quicksilver has been updated" messages ;)
Re: OS X Command Line Utilities
#220Earlier quoted context omitted.
But the open command doesn't allow you to pass the environment, and Apple seems hellbent on breaking every workaround they've implemented over the years (e.g. ~/.MacOSX/environment.plist). So, doing Foo.app/Contents/MacOS/Foo is often the only way to launch a GUI app while inheriting the full environment that you have on the command line. I often have to do this to launch various developer tools, and have them be abl…
> But the open command doesn't allow you to pass the environment Uh? I’ve been using open to pass NSZombieEnabled and other debugging stuff to apps all the time and it works. From man open(1): Opened applications inherit environment variables just as if you had launched the application directly through its full path. This behavior was also present in Tiger.
Opened applications inherit environment variables just
as if you had launched the application directly through
its full path. This behavior was also present in *Tiger*.
Sigh, I'm old...