diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 7a97821..dc0242e 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -79,7 +79,7 @@ fi # Use ISO 8601 date & time. if [[ "${LC_TIME}" != "en_DK.utf8" ]] && command -v locale > /dev/null; then - [[ "$(locale --all-locales)" =~ "en_DK" ]] && export LC_TIME="en_DK.utf8" + [[ "$(locale --all-locales)" == *en_DK* ]] && export LC_TIME="en_DK.utf8" fi export CCACHE_DIR="/var/cache/ccache" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 68e4ce7..6a20795 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -132,7 +132,7 @@ case ${TERM} in (dumb) # Emacs shells and TRAMP. unsetopt ZLE - if [[ ${INSIDE_EMACS} =~ "tramp" ]]; then + if [[ ${INSIDE_EMACS} == *tramp* ]]; then HISTFILE="/dev/null" fi diff --git a/.config/zsh/aliases.zsh b/.config/zsh/aliases.zsh index 9449d7c..649a791 100644 --- a/.config/zsh/aliases.zsh +++ b/.config/zsh/aliases.zsh @@ -24,13 +24,13 @@ alias man="LC_MESSAGES=C man" alias make="LC_MESSAGES=C make" alias free="LC_MESSAGES=C free" -if [[ "${VISUAL}" =~ "emacs(client|remote)" ]]; then +if [[ ${VISUAL} == *emacs(client|remote)* ]]; then local tmp_editor="${VISUAL/ -c/}" local ec_opts="" # Workaround for . [[ -z "${DISPLAY}" ]] && ec_opts=" -c" alias e="${tmp_editor}${ec_opts}" - if [[ "${tmp_editor}" =~ "emacsremote$" ]]; then + if [[ "${tmp_editor}" == *emacsremote ]]; then alias se="${tmp_editor} --sudo" elif pgrep -f "emacs --daemon" > /dev/null; then # Edit files as root in the Emacs instance run by the current user. diff --git a/.config/zsh/keys.zsh b/.config/zsh/keys.zsh index 65cf53c..cdaa8d5 100644 --- a/.config/zsh/keys.zsh +++ b/.config/zsh/keys.zsh @@ -55,7 +55,7 @@ bindkey '^[[1;5D' backward-word # C-Left bindkey '^[[1;5C' forward-word # C-Right -if [[ "${TERM}" =~ "^rxvt" ]]; then +if [[ "${TERM}" == rxvt* ]]; then bindkey '^[[3^' delete-word bindkey '^[Od' backward-word bindkey '^[Oc' forward-word