1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 14:00:46 +00:00

Merge branch 'master' into smarter_install

This commit is contained in:
William Ting 2012-03-19 12:17:54 -10:00
commit 0be45062c3
4 changed files with 8 additions and 8 deletions

View File

@ -44,11 +44,11 @@ _autojump_files()
EOF
fi
}
complete -o default -o bashdefault -F _autojump_files cp mv meld diff kdiff3
complete -o default -o bashdefault -F _autojump_files cp mv meld diff kdiff3 vim emacs
#determine the data directory according to the XDG Base Directory Specification
if [ -n "$XDG_DATA_HOME" ]; then
export AUTOJUMP_DATA_DIR="$XDG_DATA_HOME/autojump"
if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} =~ ${USER} ]]; then
export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump"
else
export AUTOJUMP_DATA_DIR=~/.local/share/autojump
fi

View File

@ -15,7 +15,7 @@
#along with autojump. If not, see <http://www.gnu.org/licenses/>.
# determine the data directory according to the XDG Base Directory Specification
if [[ -n ${XDG_DATA_HOME} ]]; then
if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} =~ ${USER} ]]; then
export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump"
else
export AUTOJUMP_DATA_DIR=${HOME}/.local/share/autojump

View File

@ -21,9 +21,9 @@ function add_msg {
echo
if [ "${1}" == "global" ]; then
echo -e "\tsource /etc/profile.d/autojump.${2}"
echo -e "\t[[ -f /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
elif [ "${1}" == "local" ]; then
echo -e "\tsource ~/.autojump/etc/profile.d/autojump.${2}"
echo -e "\t[[ -f ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
fi
echo

View File

@ -24,9 +24,9 @@ function remove_msg {
echo "Please remove the line from .${2}rc :"
echo
if [ "${1}" == "global" ]; then
echo -e "\tsource /etc/profile.d/autojump.${2}"
echo -e "\t[[ -f /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
elif [ "${1}" == "local" ]; then
echo -e "\tsource ~/.autojump/etc/profile.d/autojump.${2}"
echo -e "\t[[ -f ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
fi
echo
}