Replace regular expressions with globs

This commit is contained in:
tastytea 2022-04-28 12:53:35 +02:00
parent 116e79518f
commit 3820ba8626
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
4 changed files with 5 additions and 5 deletions

View File

@ -79,7 +79,7 @@ fi
# Use ISO 8601 date & time. # Use ISO 8601 date & time.
if [[ "${LC_TIME}" != "en_DK.utf8" ]] && command -v locale > /dev/null; then 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 fi
export CCACHE_DIR="/var/cache/ccache" export CCACHE_DIR="/var/cache/ccache"

View File

@ -132,7 +132,7 @@ case ${TERM} in
(dumb) # Emacs shells and TRAMP. (dumb) # Emacs shells and TRAMP.
unsetopt ZLE unsetopt ZLE
if [[ ${INSIDE_EMACS} =~ "tramp" ]]; then if [[ ${INSIDE_EMACS} == *tramp* ]]; then
HISTFILE="/dev/null" HISTFILE="/dev/null"
fi fi

View File

@ -24,13 +24,13 @@ alias man="LC_MESSAGES=C man"
alias make="LC_MESSAGES=C make" alias make="LC_MESSAGES=C make"
alias free="LC_MESSAGES=C free" alias free="LC_MESSAGES=C free"
if [[ "${VISUAL}" =~ "emacs(client|remote)" ]]; then if [[ ${VISUAL} == *emacs(client|remote)* ]]; then
local tmp_editor="${VISUAL/ -c/}" local tmp_editor="${VISUAL/ -c/}"
local ec_opts="" local ec_opts=""
# Workaround for <https://emacs.stackexchange.com/q/63843>. # Workaround for <https://emacs.stackexchange.com/q/63843>.
[[ -z "${DISPLAY}" ]] && ec_opts=" -c" [[ -z "${DISPLAY}" ]] && ec_opts=" -c"
alias e="${tmp_editor}${ec_opts}" alias e="${tmp_editor}${ec_opts}"
if [[ "${tmp_editor}" =~ "emacsremote$" ]]; then if [[ "${tmp_editor}" == *emacsremote ]]; then
alias se="${tmp_editor} --sudo" alias se="${tmp_editor} --sudo"
elif pgrep -f "emacs --daemon" > /dev/null; then elif pgrep -f "emacs --daemon" > /dev/null; then
# Edit files as root in the Emacs instance run by the current user. # Edit files as root in the Emacs instance run by the current user.

View File

@ -55,7 +55,7 @@ bindkey '^[[1;5D' backward-word # C-Left
bindkey '^[[1;5C' forward-word # C-Right bindkey '^[[1;5C' forward-word # C-Right
if [[ "${TERM}" =~ "^rxvt" ]]; then if [[ "${TERM}" == rxvt* ]]; then
bindkey '^[[3^' delete-word bindkey '^[[3^' delete-word
bindkey '^[Od' backward-word bindkey '^[Od' backward-word
bindkey '^[Oc' forward-word bindkey '^[Oc' forward-word