mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Added everything and corrected bug
This commit is contained in:
parent
c43c7b73b5
commit
ea884972e6
@ -1,5 +1,6 @@
|
||||
#Source autojump.bashrc only if we're on bash, as it is
|
||||
#not compatible with other shells
|
||||
# Source autojump on BASH or ZSH depending on the shell
|
||||
if [ "$BASH_VERSION" ] && [ -n "$PS1" ] && echo $SHELLOPTS | grep -v posix >>/dev/null; then
|
||||
. /etc/profile.d/autojump.bash
|
||||
elif [ "$ZSH_VERSION" ] && [ -n "$PS1" ]; then
|
||||
. /etc/profile.d/autojump.zsh
|
||||
fi
|
||||
|
@ -1,3 +1,7 @@
|
||||
function preexec() {
|
||||
(autojump -a "$(pwd -P)"&)>/dev/null
|
||||
}
|
||||
|
||||
alias jumpstat="autojump --stat"
|
||||
|
||||
function j { new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";fi }
|
||||
|
@ -16,6 +16,7 @@ cp _j $(echo $FPATH | cut -d":" -f 1)
|
||||
|
||||
if [ -d "/etc/profile.d" ]; then
|
||||
sudo cp autojump.zsh /etc/profile.d/
|
||||
sudo cp autojump.sh /etc/profile.d/
|
||||
echo "Remember to add the line"
|
||||
echo " source /etc/profile"
|
||||
echo "to your ~/.zshrc if it's not there already"
|
||||
|
Loading…
Reference in New Issue
Block a user