diff --git a/zsh/03-vars.zsh b/zsh/03-vars.zsh index b98a619..7c0e48c 100644 --- a/zsh/03-vars.zsh +++ b/zsh/03-vars.zsh @@ -3,6 +3,7 @@ OS=`uname` OS_RELEASE=`uname -r` +OS_ARCH=`uname -m` # Distro detection. LSBRELEASE=$(which lsb_release) diff --git a/zsh/30-keys.zsh b/zsh/30-keys.zsh index 8534e33..c2430e7 100644 --- a/zsh/30-keys.zsh +++ b/zsh/30-keys.zsh @@ -96,7 +96,7 @@ case "${TERM}" in bindkey '\e[1~' beginning-of-line # home bindkey '\e[4~' end-of-line # end ;; - screen) + screen*) bindkey '^[[1~' beginning-of-line # home bindkey '^[[4~' end-of-line # end bindkey '\e[3~' delete-char # delete @@ -104,5 +104,7 @@ case "${TERM}" in bindkey '\eOd' backward-word # ctrl left bindkey '^[[1;5C' forward-word # ctrl right bindkey '^[[1;5D' backward-word # ctrl left + bindkey '^[[1;3C' forward-word # alt right + bindkey '^[[1;3D' backward-word # alt left ;; esac diff --git a/zsh/plugins/autosuggestions.plugin.zsh b/zsh/plugins/autosuggestions.plugin.zsh index ec7f1bb..7e72312 100644 --- a/zsh/plugins/autosuggestions.plugin.zsh +++ b/zsh/plugins/autosuggestions.plugin.zsh @@ -2,7 +2,8 @@ AUTOSUGGESTIONS_PATH="" if [ "${DISTRO}" = "Arch" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi if [ "${DISTRO}" = "Debian" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi -if [ "${DISTRO}" = "Darwin" ]; then AUTOSUGGESTIONS_PATH="/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi +if [ "${DISTRO}" = "Darwin" -a "${OS_ARCH}" == "arm64" ]; then AUTOSUGGESTIONS_PATH="/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi +if [ "${DISTRO}" = "Darwin" -a "${OS_ARCH}" == "x86_64" ]; then AUTOSUGGESTIONS_PATH="/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi if [ "${DISTRO}" = "Ubuntu" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi if [ "${DISTRO}" = "VoidLinux" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions.zsh"; fi