Merge remote-tracking branch 'joelthelion/master'

pull/329/head
Leonid Shevtsov 9 years ago
commit 1881967cb0

@ -1,7 +1,7 @@
## Summary of release changes, see commit history for more details: ## Summary of release changes, see commit history for more details:
## https://github.com/joelthelion/autojump/commits/master/ ## https://github.com/joelthelion/autojump/commits/master/
### Release v22.0.0: ### Release v22.2.2:
#### Backwards Incompatible #### Backwards Incompatible
@ -22,6 +22,7 @@
- AUTOJUMP_DATA_DIR - AUTOJUMP_DATA_DIR
- AUTOJUMP_IGNORE_CASE - AUTOJUMP_IGNORE_CASE
- AUTOJUMP_KEEP_SYMLINKS - AUTOJUMP_KEEP_SYMLINKS
- misc bug fixes
#### Features and Bug Fixes #### Features and Bug Fixes

@ -60,7 +60,7 @@ from autojump_utils import sanitize
from autojump_utils import take from autojump_utils import take
from autojump_utils import unico from autojump_utils import unico
VERSION = '22.2.1-beta' VERSION = '22.2.4'
FUZZY_MATCH_THRESHOLD = 0.6 FUZZY_MATCH_THRESHOLD = 0.6
TAB_ENTRIES_COUNT = 9 TAB_ENTRIES_COUNT = 9
TAB_SEPARATOR = '__' TAB_SEPARATOR = '__'

@ -13,16 +13,17 @@ complete -x -c j -a '(autojump --complete (commandline -t))'
# set error file location # set error file location
if test (uname) = "Darwin" if test (uname) = "Darwin"
set -x AUTOJUMP_ERROR_PATH ~/Library/autojump/errors.log set -x AUTOJUMP_ERROR_PATH ~/Library/autojump/errors.log
else if test -d $XDG_DATA_HOME else if test -d "$XDG_DATA_HOME"
set -x AUTOJUMP_ERROR_PATH $XDG_DATA_HOME/autojump/errors.log set -x AUTOJUMP_ERROR_PATH $XDG_DATA_HOME/autojump/errors.log
else else
set -x AUTOJUMP_ERROR_PATH ~/.local/share/autojump/errors.log set -x AUTOJUMP_ERROR_PATH ~/.local/share/autojump/errors.log
end end
if test ! -d (dirname "$AUTOJUMP_ERROR_PATH") if test ! -d (dirname $AUTOJUMP_ERROR_PATH)
mkdir -p (dirname "$AUTOJUMP_ERROR_PATH") mkdir -p (dirname $AUTOJUMP_ERROR_PATH)
end end
# change pwd hook # change pwd hook
function __aj_add --on-variable PWD function __aj_add --on-variable PWD
status --is-command-substitution; and return status --is-command-substitution; and return

@ -14,14 +14,13 @@ fi
# prevent circular loop for sh shells # prevent circular loop for sh shells
if [ "${shell}" = "sh" ]; then if [ "${shell}" = "sh" ]; then
return 0 return 0
# check local install # check local install
elif [ -s ~/.autojump/share/autojump/autojump.${shell} ]; then elif [ -s ~/.autojump/share/autojump/autojump.${shell} ]; then
source ~/.autojump/share/autojump/autojump.${shell} source ~/.autojump/share/autojump/autojump.${shell}
# check global install # check global install
elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then
source /usr/local/share/autojump/autojump.${shell} source /usr/local/share/autojump/autojump.${shell}
fi fi

@ -29,13 +29,13 @@ def mkdir(path, dryrun=False):
os.makedirs(path) os.makedirs(path)
def modify_autojump_sh(etc_dir, dryrun=False): def modify_autojump_sh(etc_dir, share_dir, dryrun=False):
"""Append custom installation path to autojump.sh""" """Append custom installation path to autojump.sh"""
custom_install = "\ custom_install = "\
\n# check custom install \ \n# check custom install \
\nif [ -s %s/autojump.${shell} ]; then \ \nif [ -s %s/autojump.${shell} ]; then \
\n\tsource %s/autojump.${shell} \ \n source %s/autojump.${shell} \
\nfi\n" % (etc_dir, etc_dir) \nfi\n" % (share_dir, share_dir)
with open(os.path.join(etc_dir, 'autojump.sh'), 'a') as f: with open(os.path.join(etc_dir, 'autojump.sh'), 'a') as f:
f.write(custom_install) f.write(custom_install)
@ -207,7 +207,7 @@ def main(args):
cp('./bin/_j', zshshare_dir, args.dryrun) cp('./bin/_j', zshshare_dir, args.dryrun)
if args.custom_install: if args.custom_install:
modify_autojump_sh(etc_dir, args.dryrun) modify_autojump_sh(etc_dir, share_dir, args.dryrun)
show_post_installation_message(etc_dir, share_dir, bin_dir) show_post_installation_message(etc_dir, share_dir, bin_dir)

Loading…
Cancel
Save