mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Merge branch 'master' of https://github.com/joelthelion/autojump
This commit is contained in:
commit
9244e2a4f8
2
autojump
2
autojump
@ -28,7 +28,7 @@ from operator import itemgetter
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
AUTOJUMP_VERSION = "release-v18"
|
AUTOJUMP_VERSION = "release-v19"
|
||||||
MAX_KEYWEIGHT = 1000
|
MAX_KEYWEIGHT = 1000
|
||||||
MAX_STORED_PATHS = 600
|
MAX_STORED_PATHS = 600
|
||||||
COMPLETION_SEPARATOR = '__'
|
COMPLETION_SEPARATOR = '__'
|
||||||
|
@ -39,15 +39,13 @@ _autojump_files()
|
|||||||
comps=$(autojump --bash --completion $cur)
|
comps=$(autojump --bash --completion $cur)
|
||||||
while read i
|
while read i
|
||||||
do
|
do
|
||||||
#COMPREPLY=("${COMPREPLY[@]}" "${COMP_WORDS[@]:1:$(( ${#COMP_WORDS[@]} - 1 ))}${i}")
|
|
||||||
COMPREPLY=("${COMPREPLY[@]}" "${i}")
|
COMPREPLY=("${COMPREPLY[@]}" "${i}")
|
||||||
done <<EOF
|
done <<EOF
|
||||||
$comps
|
$comps
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
complete -o default -o bashdefault -F _autojump_files cp
|
complete -o default -o bashdefault -F _autojump_files cp mv meld diff kdiff3
|
||||||
complete -o default -o bashdefault -F _autojump_files mv
|
|
||||||
|
|
||||||
#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" ]
|
if [ -n "$XDG_DATA_HOME" ]
|
||||||
|
11
install.sh
11
install.sh
@ -33,8 +33,14 @@ prefix=/usr
|
|||||||
profile_d=/etc/profile.d
|
profile_d=/etc/profile.d
|
||||||
|
|
||||||
user=${SUDO_USER:-${USER}}
|
user=${SUDO_USER:-${USER}}
|
||||||
user_home=$(getent passwd ${user} | cut -d: -f6)
|
OS=`uname`
|
||||||
bashrc_file=${user_home}/.bashrc
|
|
||||||
|
if [ $OS == 'Darwin' ]; then
|
||||||
|
user_home=$(dscl . -search /Users UniqueID ${user} | cut -d: -f6)
|
||||||
|
else
|
||||||
|
user_home=$(getent passwd ${user} | cut -d: -f6)
|
||||||
|
fi
|
||||||
|
bashrc_file=${user_home}/.bashrc
|
||||||
|
|
||||||
# Command line parsing
|
# Command line parsing
|
||||||
while true; do
|
while true; do
|
||||||
@ -103,7 +109,6 @@ else
|
|||||||
# Since OSX uses .bash_profile, we need to make sure that .bashrc is properly sourced.
|
# Since OSX uses .bash_profile, we need to make sure that .bashrc is properly sourced.
|
||||||
# Makes the assumption that if they have a line: source ~/.bashrc or . ~/.bashrc, that
|
# Makes the assumption that if they have a line: source ~/.bashrc or . ~/.bashrc, that
|
||||||
# .bashrc has been properly sourced and you don't need to add it.
|
# .bashrc has been properly sourced and you don't need to add it.
|
||||||
OS=`uname`
|
|
||||||
if [ $OS == 'Darwin' -a x`grep -c "^[[:space:]]*\(source\|\.\) ~/\.bashrc[[:space:]]*$" ~/.bash_profile` == x0 ]; then
|
if [ $OS == 'Darwin' -a x`grep -c "^[[:space:]]*\(source\|\.\) ~/\.bashrc[[:space:]]*$" ~/.bash_profile` == x0 ]; then
|
||||||
echo "You are using OSX and your .bash_profile doesn't seem to be sourcing .bashrc"
|
echo "You are using OSX and your .bash_profile doesn't seem to be sourcing .bashrc"
|
||||||
echo "Adding source ~/.bashrc to your bashrc"
|
echo "Adding source ~/.bashrc to your bashrc"
|
||||||
|
Loading…
Reference in New Issue
Block a user