This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## TL;DR | |
setopt extendedglob | |
ls *(<tab> # to get help regarding globbing | |
rm ../debianpackage(.) # remove files only | |
ls -d *(/) # list directories only | |
ls /etc/*(@) # list symlinks only | |
ls -l *.(png|jpg|gif) # list pictures only | |
ls *(*) # list executables only | |
ls /etc/**/zsh # which directories contain 'zsh'? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#kill bluetoothd to reset bluetooth wonkiness in macOS | |
#catalina, big sur, monterey | |
#fixes continuity, magic keyboard mismapping of function keys, magic mouse scrolling | |
current_userid=$(id -u) | |
if [ $current_userid -ne 0 ]; then | |
echo "$(basename "$0") requires superuser privileges to run" >&2 | |
echo "try: \033[1;36msudo $(basename "$0")" >&2 |