Mac Terminal commands and packages / addons - Do you use any?

I hate shell scripts and always use Python instead.

1 Like

What a cool thread!

If you ever need to crop/ split pdf files (like when you scan a book), briss is great. Install via homebrew install briss and launch with briss.

Depending on your backup needs, duplicacy might be worth a look. It deduplicates across devices and operating systems. The cli version is free for personal use.

Finally, not a cli tool but a terminal app that has made my use of the command line so much easier:

3 Likes

How about a few examples?

Never heard of Warp, but I might give it a try.

First user impression is bad though: requires an account and has telemetry…

Additionally it does not support my Powerlevel10k prompt :cry:

Hope I get more positive about it after using it for a while!

1 Like

I’ve always liked htop more than anything GUI-based…

I’m a huge fan of ZSH; I didn’t realize that Apple had switched, but in addition to ZSH, I would recommend Oh My ZSH. But I have a friend who used to use FISH and loved it. I got really attached to ZSH for some reason, and it’s nearly the first thing I do whenever I setup a new VPS.

What do you find to be the advantages of ZSH over other shells such as bash?

Terminal features are not something I have spent any amount of time on so I neither have the experience nor the vocabulary to really say something useful here, but FWIW:

  1. I like way it blocks each command with its corresponding output. That makes it very easy to go back in your terminal history and so you don’t have to worry about writing potentially important stuff into files. It is also very easy to copy any such block (entirely, only the command, or only the output).
  2. Since I don’t use the terminal so much, I keep forgetting even those commands that I use (relatively) frequently (getting better, though). So I often find myself searching for those commands in the shell history. I find that process to be more user friendly in Warp, though for anyone who knows their shortcuts and have their shell and client configured to fit their needs, this is probably nothing of value.
  3. When a command fails (e.g. because I forgot sudo, Warp often suggests a better version of the command that you can use with a click. This functionality is still rather basic, but with the current surge of AI-assisted everything, I anticipate it becoming much more powerful.
  4. tab completion is already very powerful in any shell I’ve used (and for me, it‘s one of the things that make the cli attractive in the first place), but warp manages to make it yet another bit easier to use for people like me, who don’t spent the majority of their time in the shell, when it provides popup menus to select alternatives when the completion is ambiguous.
3 Likes

I don’t do such advanced shell scripting that I find differences between bash or zsh, but obviously zsh allows more prompt configuration than bash --like, you can customize the right hand side of the prompt–. So, at the very least, zsh is a nicer looking bash --although it probably goes well beyond that. But when hacking shell scripts I’d prefer not to deviate from standard bash just for the sake of compatibility.

I only reallyuse one, scrcpy which will mirror an Android screen on the mac, allows me to make video screen captures of stuff on the Android as I di it and is seamless so I can use my mac keyboard and mouse or tap on the tablet to operate it. Absolutely wonderful for showing how things work on LambTracker and AnimalTrakker because I can share the screen via zoom and help users through problems more esily.

We use that as well at work.

It’s so sad that Apple does offer anything similar for iPhones!

You can use Quicktime and a cable to do that. Just select the iPhone screen as the source for the video.

How do you do that? I have no choices when I choose to record a screen capture. Iit always goes to the Mac screen and I don’t see any options to choose a different source.

We already do that, but you can’t control the iPhone from your Mac that way; only display the screen.

It’s ironic that Android phones in this aspect have better Mac integration then iPhones…

Here’s a tutorial on how to do it.

This is true and perhaps a limitation for your use case as well, @OogieM.

That actually went faster than I thought:

I’m sure you know this, but for others (like me…) who routinely forget to use sudo, then typing sudo !! at the prompt will recreate your last command with "sudo " in front of it. As far as I know, this works in bash, zsh and most other shells.

Advance users can replace sudo with other commands and !! with a shedload of other combinations for various other features (e.g. just to repeat one of the parameters of the last command) but I can never remember them.

Unfortunately, I can also never remember what the ‘!!’ etc feature is called, which doesn’t help learning the others…

sudo !! is burnt into my fingers though…

EDIT: the feature is called ‘expansion’ and here’s an explanation (scroll down to “Expanding ZSH History”, “Event Designators” and “Word Designators”: A Guide to Zsh Expansion with Examples

4 Likes

I don’t like having to log into a third party to use the terminal on my Mac. But that’s just me. :slightly_smiling_face:

4 Likes

I did not know this :slight_smile: It’s probably because if I’m doing stuff as root I usually just sudo my shell :wink:

1 Like

I might be weird, but I actually like Vim as a text editor. I would also recommend getting comfortable with your .zshrc file so that you can make some custom aliases. If you’re looking for an add-on, there’s Oh-My-Zsh.

4 Likes