Key | Function |
---|---|
cmd + ` (grave accent) | switch between windows of a same program |
Shortcut List
- Mac keyboard shortcuts - support.apple.com
- Mac OS X Finder Keyboard Shortcuts - dummies.com
-
Display disk usage statistics sorted by human readable numbers
# see "brew info dust" dust -d1 # use GNU sort which supports "-h" option, "brew info coreutils" $ du -hd 1 | gsort -h
-
Open man page in new terminal window
open x-man-page://<name>
https://scriptingosx.com/2017/04/on-viewing-man-pages/ -
zip
andunzip
# dry run, list files unzip -l file.zip # unzip specific file unzip file.zip path/to/file.txt # this will create "./path/to/file.txt" # unzip specific file and drop directory structures in archive unzip -j file.zip path/to/file.txt # this will create "./file.txt"
-
Remove duplicates in zsh history (ref)
cat -n $HISTFILE | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zsh_short_history
problematic with multiline history entries
- https://zsh.sourceforge.io/
- repo https://sourceforge.net/projects/zsh/ github mirror https://github.com/zsh-users/zsh/ (see intro https://zsh.sourceforge.io/Arc/git.html)
- Show dependencies as a tree:
brew deps --tree <formula>
Name | Homebrew formula |
---|---|
ggrep |
brew info grep |
gsed |
brew info gnu-sed |
gsort |
brew info coreutils |
- Skip "unidentified developer" prompt
xattr -dr com.apple.quarantine /Applications/texstudio.app
https://apple.stackexchange.com/a/202172
-
Display local location of Homebrew itself or one of cloned tap https://docs.brew.sh/Manpage#--repository---repo-tap-
brew [--repository|--repo] [OWNER/REPO]
# /usr/local/Homebrew cd $(brew --repository) # tap OWNER/REPO is located in $(brew --repo)/Library/Taps/OWNER/homebrew-REPO brew --repo homebrew/services brew --repo dart-lang/dart
-
Show (installed) dependents of a formula https://docs.brew.sh/Manpage#uses-options-formula-
brew uses --recursive --installed FORMULA
saw in https://stackoverflow.com/a/66142860 -
Show dependencies of a formula https://docs.brew.sh/Manpage#deps-options-formulacask-
brew deps FORMULA
-
List formulae and casks in a tap https://docs.brew.sh/Manpage#tap-info---installed---json-tap-
brew tap-info --json TAP | jq -r '.[] | (.formula_names[], .cask_tokens[])'
-
Bump a formula or cask https://docs.brew.sh/Manpage#bump-formula-pr-options-formula https://docs.brew.sh/Manpage#bump-cask-pr-options-cask
brew bump-formula-pr --version=VERSION [--write-only] FORMULA brew bump-cask-pr --version=VERSION [--write-only] cask
Application: my
workflow_dispatch
-triggerable GitHub Action workflowbrew-bump-pr.yml
.
-
Adding formula or cask to Homebrew https://docs.brew.sh/Adding-Software-to-Homebrew
-
Formula Cookbook https://docs.brew.sh/Formula-Cookbook
-
Cask Cookbook https://docs.brew.sh/Cask-Cookbook
-
- Example: Homebrew/homebrew-cask-fonts#2082
/etc/profiles
/usr/libexec/path_helper -s
/etc/paths
+ file lines under/etc/paths.d
- shell profiles (e.g., zsh startup files) see ref