Created
December 13, 2022 11:35
-
-
Save lincerely/6f43cccd3e029bff0b36636bc82da114 to your computer and use it in GitHub Desktop.
print all URL schemes in macos
This file contains hidden or 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
| #!/usr/bin/env bash | |
| #lsURLscheme.sh - print all URL schemes in macos | |
| /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump |\ | |
| sed -n -e '/CFBundleName/p' -e '/CFBundleURLSchemes/,/);/p' |\ | |
| awk ' | |
| /CFBundleName/ { | |
| sub(/;$/,""); | |
| sub(" CFBundleName = ",""); | |
| app=$0; | |
| next; | |
| }; | |
| $0 !~ /(\);|CFBundleURLSchemes)/ { | |
| sub(/,$/,""); | |
| sub(/^ */,""); | |
| print app "\t" $0; | |
| }; | |
| ' |\ | |
| sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment