mirror of https://github.com/wting/autojump
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 }
|
||||
|
Loading…
Reference in new issue