mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
hardcoded _j copy to distro default function location for global zsh installs
This commit is contained in:
parent
b4c6dcc419
commit
02262b9089
15
install.sh
15
install.sh
@ -27,7 +27,7 @@ function add_msg {
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "You need to 'source ~/.${2}rc' before you can start using autojump."
|
||||
echo "You need to run 'source ~/.${2}rc' before you can start using autojump."
|
||||
echo
|
||||
echo "To remove autojump, run './uninstall.sh'"
|
||||
echo
|
||||
@ -115,16 +115,13 @@ if [ ! ${local} ]; then
|
||||
# install _j to the first accessible directory
|
||||
if [ ${shell} == "zsh" ]; then
|
||||
success=
|
||||
for f in ${fpath}
|
||||
do
|
||||
cp _j $f && success=true && break
|
||||
done
|
||||
cp -v _j /usr/local/share/zsh/site-functions/ $f && success=true
|
||||
|
||||
if [ ${success} ]; then
|
||||
echo "Installed autocompletion file to ${f}"
|
||||
else
|
||||
if [ ! ${success} ]; then
|
||||
echo
|
||||
echo "Couldn't find a place to put the autocompletion file, please copy _j into your \$fpath"
|
||||
echo "Still trying to install the rest of autojump..."
|
||||
echo "Installing the rest of autojump ..."
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
|
19
uninstall.sh
19
uninstall.sh
@ -19,17 +19,18 @@ function help_msg {
|
||||
echo "sudo ./uninstall.sh [--prefix /usr/local]"
|
||||
}
|
||||
|
||||
# zsh: remove _j from fpath
|
||||
function remove_j {
|
||||
# zsh: remove _j from fpath, only works within zsh
|
||||
# autocompletion file in the first directory of the FPATH variable
|
||||
fail=true
|
||||
for f in $fpath
|
||||
do
|
||||
if [ -f ${f}/_j ]; then
|
||||
rm -v ${f}/_j || sudo rm -v ${f}/_j
|
||||
break
|
||||
fi
|
||||
done
|
||||
#fail=true
|
||||
#for f in $fpath
|
||||
#do
|
||||
#if [ -f ${f}/_j ]; then
|
||||
#rm -v ${f}/_j || sudo rm -v ${f}/_j
|
||||
#break
|
||||
#fi
|
||||
#done
|
||||
sudo rm -v /usr/local/share/zsh/site-functions/_j
|
||||
}
|
||||
|
||||
function remove_msg {
|
||||
|
Loading…
Reference in New Issue
Block a user