From c882cb24946affb6ba3aa7e3e7e4e8012379250c Mon Sep 17 00:00:00 2001 From: hophacker Date: Fri, 16 Oct 2020 09:47:07 +0800 Subject: [PATCH] add OS specific aliases(list_identities) & functions(remove_helper) --- zsh/aliases-darwin.zsh | 5 +++++ zsh/functions-darwin.zsh | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 zsh/aliases-darwin.zsh create mode 100644 zsh/functions-darwin.zsh diff --git a/zsh/aliases-darwin.zsh b/zsh/aliases-darwin.zsh new file mode 100644 index 0000000..135a683 --- /dev/null +++ b/zsh/aliases-darwin.zsh @@ -0,0 +1,5 @@ +if [[ "$(uname)" != "Darwin" ]]; then + return +fi + +alias list_identities='security find-identity -v -p codesigning' diff --git a/zsh/functions-darwin.zsh b/zsh/functions-darwin.zsh new file mode 100644 index 0000000..efa2e18 --- /dev/null +++ b/zsh/functions-darwin.zsh @@ -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 +} +