From 21bf9e30a6009dc7d93c495ea790da06970a4f6f Mon Sep 17 00:00:00 2001 From: Jonathan Barnes Date: Mon, 23 Aug 2021 18:57:56 +0100 Subject: [PATCH] Fix more M1 issues --- zsh/functions.zsh | 2 ++ zsh/zsh-autosuggestions.zsh | 4 +++- zsh/zsh-substring-search.zsh | 7 +++++-- zsh/zsh-syntax-highlighting.zsh | 4 +++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index e787057..9185ff8 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -7,7 +7,9 @@ gencert () { DOMAIN=$1 test -d /usr/local/opt/openssl@1.1/bin && PATH='/usr/local/opt/openssl@1.1/bin':$PATH + test -d /opt/homebrew/opt/openssl@1.1/bin && PATH='/opt/homebrew/opt/openssl@1.1/bin':$PATH test -f /usr/local/etc/openssl@1.1/openssl.cnf && SSLCNF='/usr/local/etc/openssl@1.1/openssl.cnf' + test -f /opt/homebrew/etc/openssl@1.1/openssl.cnf && SSLCNF='/opt/homebrew/etc/openssl@1.1/openssl.cnf' test -f /etc/ssl/openssl.cnf && SSLCNF='/etc/ssl/openssl.cnf' cd $HOME/git/ca diff --git a/zsh/zsh-autosuggestions.zsh b/zsh/zsh-autosuggestions.zsh index ed56d19..9983225 100644 --- a/zsh/zsh-autosuggestions.zsh +++ b/zsh/zsh-autosuggestions.zsh @@ -2,4 +2,6 @@ test -e /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh \ && source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh test -e /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh \ -&& source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh \ No newline at end of file +&& source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +test -e /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh \ +&& source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh \ No newline at end of file diff --git a/zsh/zsh-substring-search.zsh b/zsh/zsh-substring-search.zsh index 19e4ab5..effa11b 100644 --- a/zsh/zsh-substring-search.zsh +++ b/zsh/zsh-substring-search.zsh @@ -1,5 +1,5 @@ # ZSH substring search -bindKeysZshHistoryOSX() { +bindKeysZshHistoryMacOS() { zmodload zsh/terminfo bindkey "$terminfo[kcuu1]" history-substring-search-up bindkey "$terminfo[kcud1]" history-substring-search-down @@ -13,5 +13,8 @@ test -e /usr/local/opt/zsh-history-substring-search/zsh-history-substring-search && source /usr/local/opt/zsh-history-substring-search/zsh-history-substring-search.zsh test -e /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh \ && source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh -test $PLATFORM = 'osx' && bindKeysZshHistoryOSX +test -e /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh \ +&& source /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh +test $PLATFORM = 'osx' && bindKeysZshHistoryMacOS +test $PLATFORM = 'osx-m1' && bindKeysZshHistoryMacOS test $PLATFORM = 'linux' && bindKeysZshHistoryLinux \ No newline at end of file diff --git a/zsh/zsh-syntax-highlighting.zsh b/zsh/zsh-syntax-highlighting.zsh index c8f4508..54dc317 100644 --- a/zsh/zsh-syntax-highlighting.zsh +++ b/zsh/zsh-syntax-highlighting.zsh @@ -2,4 +2,6 @@ test -e /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \ && source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh test -e /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \ -&& source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \ No newline at end of file +&& source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +test -e /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \ +&& source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \ No newline at end of file