wait caffeinate exists natively? ive been using a third party caffeine tool for the longest time..
macOS command-line tools you might not know about
201–210 of 454 posts
Re: macOS command-line tools you might not know about
#202Earlier quoted context omitted.
They come from BSD (and, nitpick, are not called coreutils). These BSD tools lack features mostly only if you're used to GNU coreutils. The expanse of GNU coreutils features is questionable too: some are nice, some you can do without easily and rarely to never miss, and some are downright annoying (yes I'm looking at you, ls with colors+quotes)
Obviously everything is preference, but I prefer things like expanded regex in gnu grep to the underpowered macOS utils
Re: macOS command-line tools you might not know about
#203Earlier quoted context omitted.
In what way do you see those alternatives as superior?
They avoid an unnecessary invocation of the cat executable. Instead, they open a file descriptor and pass that. Tiny difference but there you go.
In short, I straight up don't care.
Re: macOS command-line tools you might not know about
#204Earlier quoted context omitted.
It's cool to use pbcopy and pbpaste with your phone! Copy some text on the phone, and you can pbpaste it onto the Mac command line. So cool.
It creeps me out when the clipboard is unexpectedly shared between my phone and computer. And since the feature seems to turn on randomly but not reliably when I want it to, I’d rather it just didn’t exist.
The only drawback is that yes it only works most of the time. And when it doesn’t I get infuriated.
Glitches happen without any change to settings or network on my side - it works now, and 5 min later doesn’t.
Re: macOS command-line tools you might not know about
#205Shoutout to the `diskutil` command line utility on macOS. I had problems with some slices on a disk today, and was not able to fix it with the graphical Disk Utility that comes with macOS. These slices were remnants from experimenting with running Asahi Linux on the machine in the past. I knew there had to be a way to fix it with diskutility cli program. I found a thread, and the solution for what to do in such situa…
Re: macOS command-line tools you might not know about
#206Earlier quoted context omitted.
Since you mention both pbcopy and iTerm - I love https://github.com/skaji/remote-pbcopy-iterm2 . I do most of the work on a remove Linux server, treating my MacBook as mostly a dumb terminal, and being able to transparently copy from the remove to my local clipboard is so nice.
The tmux integration in iterm is also very nice for remote work if you haven’t tried it out.
On the topic, you can also integrate tmux with the native clipboard - I have set copy-pipe to the remote pbcopy, so any selection done in tmux get copied to my local clipboard. I also just found out that tmux also support it natively (https://github.com/tmux/tmux/wiki/Clipboard#the-set-clipboar...).
Re: macOS command-line tools you might not know about
#207Earlier quoted context omitted.
Yes, this iterative procedure is often why "useless" cats get put into it. It's a very effective way of processing regular text information. e.g. I need to grab some info from textfile.txt to use as arguments to a function. cat textfile.txt looks like its comma delimited. cat textfile.txt | cut -d, -f 2-5 ah, its the third and fourth column i need cat textfile.txt | cut -d, -f 3-4 | grep '123456' perfect cat textfile…
> cat textfile.txt > looks like its comma delimited. Interesting; why wouldn't you use `head`? Who knows how big textfile.txt is?
Re: macOS command-line tools you might not know about
#208Earlier quoted context omitted.
Yes, this iterative procedure is often why "useless" cats get put into it. It's a very effective way of processing regular text information. e.g. I need to grab some info from textfile.txt to use as arguments to a function. cat textfile.txt looks like its comma delimited. cat textfile.txt | cut -d, -f 2-5 ah, its the third and fourth column i need cat textfile.txt | cut -d, -f 3-4 | grep '123456' perfect cat textfile…
> cat textfile.txt > looks like its comma delimited. Interesting; why wouldn't you use `head`? Who knows how big textfile.txt is?
Re: macOS command-line tools you might not know about
#209Earlier quoted context omitted.
It's cool to use pbcopy and pbpaste with your phone! Copy some text on the phone, and you can pbpaste it onto the Mac command line. So cool.
It creeps me out when the clipboard is unexpectedly shared between my phone and computer. And since the feature seems to turn on randomly but not reliably when I want it to, I’d rather it just didn’t exist.
So I have it enabled so there is a sound when something goes into the clipboard. Even on my mac, I have come to rely on that audio feedback. But it has the added benefit that when I am using my phone in front of my computer and I copy something on my phone, I immediate (and it is impressively fast... maybe a 200ms delay), I hear the chime that something was added to my clipboard on my mac. So it gives you that good feedback that a copy "worked".
You can also shift+cmd+V to see the clipboard history, which is another complimentary tool with universal clipboard because if a paste isn't working as expected you can see if the universal copy never "took" (as you mentioned it is semi-unreliable), or if it just got overridden. You can then use the navigator to paste the older item.
Re: macOS command-line tools you might not know about
#210Earlier quoted context omitted.
It creeps me out when the clipboard is unexpectedly shared between my phone and computer. And since the feature seems to turn on randomly but not reliably when I want it to, I’d rather it just didn’t exist.
Make sure both your phone and computer have Wi-Fi and Bluetooth turned on.
Requiring WiFi makes (so the phone/computer is on a network and can communicate with the other devices), but what's the benefit of Bluetooth? Does it only work when the phone and computer are near each other?