add OS specific aliases(list_identities) & functions(remove_helper)

This commit is contained in:
hophacker 2020-10-16 09:47:07 +08:00
parent 05b1d83dc8
commit c882cb2494
2 changed files with 13 additions and 0 deletions

5
zsh/aliases-darwin.zsh Normal file
View File

@ -0,0 +1,5 @@
if [[ "$(uname)" != "Darwin" ]]; then
return
fi
alias list_identities='security find-identity -v -p codesigning'

8
zsh/functions-darwin.zsh Normal file
View File

@ -0,0 +1,8 @@
if [[ "$(uname)" != "Darwin" ]]; then
return
fi
function remove_helper() {
sudo launchctl unload /Library/LaunchDaemons/com.$1.helper.plist; sudo rm /Library/PrivilegedHelperTools/com.$1.helper
}