mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Merge branch 'master' into smarter_install
This commit is contained in:
commit
0be45062c3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user