1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Add option to preserve paths with symlinks; Add a second command 's' to jump to a subdirectory

This commit is contained in:
Khalid Zubair 2012-02-09 23:13:32 -05:00
parent 8e86f08625
commit eae871da9a
2 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,7 @@ from operator import itemgetter
import os
import shutil
AUTOJUMP_VERSION = "release-v19"
AUTOJUMP_VERSION = "release-v19-49-g8e86f08-dirty"
MAX_KEYWEIGHT = 1000
MAX_STORED_PATHS = 600
COMPLETION_SEPARATOR = '__'

View File

@ -66,7 +66,13 @@ if [ -d ~/.autojump/ ]; then
fi
export AUTOJUMP_HOME=${HOME}
AUTOJUMP='{ [[ "$AUTOJUMP_HOME" == "$HOME" ]] && (autojump -a "$(pwd -P)"&)>/dev/null 2>>"${AUTOJUMP_DATA_DIR}/.autojump_errors";} 2>/dev/null'
if [ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]
then
_PWD_ARGS=""
else
_PWD_ARGS="-P"
fi
AUTOJUMP='{ [[ "$AUTOJUMP_HOME" == "$HOME" ]] && (autojump -a "$(pwd ${_PWD_ARGS})"&)>/dev/null 2>>"${AUTOJUMP_DATA_DIR}/.autojump_errors";} 2>/dev/null'
case $PROMPT_COMMAND in
*autojump*) ;;
@ -75,3 +81,5 @@ esac
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";else false; fi }
function s { j $PWD $@ ; }