Caffeinate is definitely the one I miss most on Windows. Super handy to keep your machine awake whilst some task is ongoing.
macOS command-line tools you might not know about
341–350 of 454 posts
Re: macOS command-line tools you might not know about
#342A lot of macOS behavior can be toggled by modifying the system component defaults. For example, turn off autohiding of the Dock from commandline: defaults write com.apple.dock "autohide" -bool "false" && killall Dock Include the date in screenshots you take: defaults write com.apple.screencapture "include-date" -bool "true" Here is handy website which documents many of the defaults and their purpose: https://macos-de…
Re: macOS command-line tools you might not know about
#343~ um prevent my mac from sleeping for 30m
caffeinate -u -t 1800
don't see what you're looking for? try providing more contextRe: macOS command-line tools you might not know about
#344Earlier quoted context omitted.
command shift 4 already saves a file, maybe you were thinking about command + shift + control + 3?
IIRC Cmd+shift+4 by default stores to a file, but it is easily changeable in settings. Mine has been set to store to clipboard since a long time ago (since i mostly ever take them to send to someone in chat or to insert into my own notes, for which clipboard is exactly what i need). To change it: open Screenshot app (either cmd+shift+5 or from the app launcher), click Options in the center bar, and set "Save to" to "…
Re: macOS command-line tools you might not know about
#345`open` is one I use all the time. I love that simple command. alias tab='open . -a iterm' alias phpstorm='open -a "PhpStorm"' alias smerge='open -a "Sublime Merge"' etc. I use those more than I do the Open/Recents dialogs in the respective apps.
Re: macOS command-line tools you might not know about
#346I find it extremely upsetting that `networkQuality` is the only command that is not entirely lowercase. How did this get through PR??
Re: macOS command-line tools you might not know about
#347Re: macOS command-line tools you might not know about
#348`open` is one I use all the time. I love that simple command. alias tab='open . -a iterm' alias phpstorm='open -a "PhpStorm"' alias smerge='open -a "Sublime Merge"' etc. I use those more than I do the Open/Recents dialogs in the respective apps.
https://github.com/davatorium/rofi
Looks like this:
https://i.imgur.com/Hm9TGeV.jpg
In a vscode terminal I just use the alias "o" and it opens that at the correct location, then I can navigate and pick a file to open in the editor.
Re: macOS command-line tools you might not know about
#349Earlier quoted context omitted.
For me it’s one of the top benefits of the Apple ecosystem. 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.
Integration is the primary reason I enjoy using Apple ecosystem. My phone, laptop, tablet and watch all work seamlessly together. I use most of Apple's "built in" applications like Mail, Notes, Photos, etc. with Firefox (instead of Safari) probably the only exception to that.
Re: macOS command-line tools you might not know about
#350Earlier quoted context omitted.
All of them do. Including bash. It’s just not the same syntax (ie ‘ But I honestly think people who try to optimise away ‘cat’ are optimising the wrong thing. If one extra fork() is that detrimental then don’t use a shell scripting language. For a lot of people, “useless” ‘cat’ enables them to write a pipeline in the order that their brain farts out the requirements for the pipeline. So they’ve optimised for human pr…
> All of them do. Including bash. Are you sure? https://unix.stackexchange.com/questions/208615/is-cat-a-she... disagrees and neither https://manpages.ubuntu.com/manpages/jammy/man7/bash-builtin... nor https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Command... mention it
> It’s just not the same syntax (ie ‘Reading from a file isn’t a hard problem. Having a good UX for doing that is where most shells fall apart. And that’s basically what ‘cat’ offers here: an improved UX.
Having ‘cat’ as a shell builtin wouldn’t really solve the complaints raised by “useless use of” anyway because you’d still be piping (and in some cases, fork()ing too). You couldnt really use ‘cat’ as syntactic sugar for ‘https://en.m.wikipedia.org/wiki/List_of_Unix_commands#/media...) the current behaviour of shells is, in my opinion, correct. This is why my own shell has a differently named builtin that approximately serves the purpose of ‘cat’ but for instances when you need the command built into the shell and it can’t just be passing a file handle to the next command (in my case, because i wanted to pass metadata out-of-band as well as the file contents)