1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Use -pcre-match in .zsh instead of =~.

Before zsh 4.3.5 =~ was not supported. This results in the message
'autojump.zsh:18: condition expected: =~'.
This commit is contained in:
Kenny MacDermid 2012-05-20 12:16:31 -03:00
parent e62e720765
commit ee1be0310b

View File

@ -1,5 +1,5 @@
# determine the data directory according to the XDG Base Directory Specification # determine the data directory according to the XDG Base Directory Specification
if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} =~ ${USER} ]]; then if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} -pcre-match ${USER} ]]; then
export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump" export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump"
else else
export AUTOJUMP_DATA_DIR=${HOME}/.local/share/autojump export AUTOJUMP_DATA_DIR=${HOME}/.local/share/autojump