Replace regular expressions with globs
This commit is contained in:
parent
116e79518f
commit
3820ba8626
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 <https://emacs.stackexchange.com/q/63843>.
|
||||
[[ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user