From ec7f788276f194f4680842e724a0c2a7810ee4f0 Mon Sep 17 00:00:00 2001 From: Erdi Aker Date: Sun, 14 Dec 2014 21:30:22 +0200 Subject: [PATCH 1/7] Fixes joelthelion/autojump#333 --- bin/autojump.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autojump.fish b/bin/autojump.fish index e4b6026..7683df9 100644 --- a/bin/autojump.fish +++ b/bin/autojump.fish @@ -11,7 +11,7 @@ complete -x -c j -a '(autojump --complete (commandline -t))' # set error file location -if (uname) == "Darwin" +if test (uname) = "Darwin" set -x AUTOJUMP_ERROR_PATH ~/Library/autojump/errors.log else if test -d $XDG_DATA_HOME set -x AUTOJUMP_ERROR_PATH $XDG_DATA_HOME/autojump/errors.log From d71a354abbc3a167fb341e2d90147006a4b7ed89 Mon Sep 17 00:00:00 2001 From: Erdi Aker Date: Sun, 14 Dec 2014 23:23:53 +0200 Subject: [PATCH 2/7] Fixes joelthelion/autojump#335 --- bin/autojump.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/autojump.fish b/bin/autojump.fish index 7683df9..b70c140 100644 --- a/bin/autojump.fish +++ b/bin/autojump.fish @@ -19,6 +19,10 @@ else set -x AUTOJUMP_ERROR_PATH ~/.local/share/autojump/errors.log end +if test ! -d (dirname $AUTOJUMP_ERROR_PATH) + mkdir -p (dirname $AUTOJUMP_ERROR_PATH) +end + # change pwd hook function __aj_add --on-variable PWD From c5f04738374625c6933b944251ea4e1ce2ea7232 Mon Sep 17 00:00:00 2001 From: William Ting Date: Mon, 15 Dec 2014 20:16:53 -0800 Subject: [PATCH 3/7] Bump to v22.2.2. --- CHANGES.md | 3 ++- bin/autojump | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5741042..7a4b7df 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ ## Summary of release changes, see commit history for more details: ## https://github.com/joelthelion/autojump/commits/master/ -### Release v22.0.0: +### Release v22.2.2: #### Backwards Incompatible @@ -22,6 +22,7 @@ - AUTOJUMP_DATA_DIR - AUTOJUMP_IGNORE_CASE - AUTOJUMP_KEEP_SYMLINKS +- misc bug fixes #### Features and Bug Fixes diff --git a/bin/autojump b/bin/autojump index 6dcda1f..5673feb 100755 --- a/bin/autojump +++ b/bin/autojump @@ -60,7 +60,7 @@ from autojump_utils import sanitize from autojump_utils import take from autojump_utils import unico -VERSION = '22.2.1-beta' +VERSION = '22.2.2' FUZZY_MATCH_THRESHOLD = 0.6 TAB_ENTRIES_COUNT = 9 TAB_SEPARATOR = '__' From 491b4fd27b3776fe87c61b333fafd2d4b18ee641 Mon Sep 17 00:00:00 2001 From: benvb Date: Wed, 7 Jan 2015 16:47:33 -0500 Subject: [PATCH 4/7] Quote $XDG_DATA_HOME when setting error file I'm not sure if this is actually a bug in fish, but (test -d) with no argument returns true, and nonexistent environment variables return an empty string, so (test -d $XDG_DATA_HOME) returns true when $XDG_DATA_HOME isn't set. Prior to making this change, I would get an error from dirname when opening a shell and an error from fish when cd'ing. --- bin/autojump.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autojump.fish b/bin/autojump.fish index b70c140..2cf5001 100644 --- a/bin/autojump.fish +++ b/bin/autojump.fish @@ -13,7 +13,7 @@ complete -x -c j -a '(autojump --complete (commandline -t))' # set error file location if test (uname) = "Darwin" 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 else set -x AUTOJUMP_ERROR_PATH ~/.local/share/autojump/errors.log From 53683525d2e8b697b89c3f5a050476f2c1a3f0e2 Mon Sep 17 00:00:00 2001 From: William Ting Date: Sun, 25 Jan 2015 16:04:36 +0900 Subject: [PATCH 5/7] Minor cleanup. --- bin/autojump.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/autojump.sh b/bin/autojump.sh index 3a25edf..0ddff47 100644 --- a/bin/autojump.sh +++ b/bin/autojump.sh @@ -14,14 +14,13 @@ fi # prevent circular loop for sh shells if [ "${shell}" = "sh" ]; then - return 0 + return 0 # check local install elif [ -s ~/.autojump/share/autojump/autojump.${shell} ]; then - source ~/.autojump/share/autojump/autojump.${shell} + source ~/.autojump/share/autojump/autojump.${shell} # check global install elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then - source /usr/local/share/autojump/autojump.${shell} - + source /usr/local/share/autojump/autojump.${shell} fi From fa3ff58d9268b208b3eaa5827acd22a313eff6f8 Mon Sep 17 00:00:00 2001 From: William Ting Date: Sun, 25 Jan 2015 16:05:19 +0900 Subject: [PATCH 6/7] Add custom sourcing to autojump.sh when using --prefix. Fixes #345. --- bin/autojump | 2 +- install.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/autojump b/bin/autojump index 5673feb..e3d89d6 100755 --- a/bin/autojump +++ b/bin/autojump @@ -60,7 +60,7 @@ from autojump_utils import sanitize from autojump_utils import take from autojump_utils import unico -VERSION = '22.2.2' +VERSION = '22.2.3' FUZZY_MATCH_THRESHOLD = 0.6 TAB_ENTRIES_COUNT = 9 TAB_SEPARATOR = '__' diff --git a/install.py b/install.py index 09fd557..90ea4f9 100755 --- a/install.py +++ b/install.py @@ -29,13 +29,13 @@ def mkdir(path, dryrun=False): 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""" custom_install = "\ \n# check custom install \ \nif [ -s %s/autojump.${shell} ]; then \ - \n\tsource %s/autojump.${shell} \ - \nfi\n" % (etc_dir, etc_dir) + \n source %s/autojump.${shell} \ + \nfi\n" % (share_dir, share_dir) with open(os.path.join(etc_dir, 'autojump.sh'), 'a') as f: f.write(custom_install) @@ -207,7 +207,7 @@ def main(args): cp('./bin/_j', zshshare_dir, args.dryrun) 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) From 8b525c1b55ef72487d0b01fb1e7f90407b7f5e99 Mon Sep 17 00:00:00 2001 From: William Ting Date: Sun, 25 Jan 2015 16:13:20 +0900 Subject: [PATCH 7/7] Bump to v22.24. --- bin/autojump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autojump b/bin/autojump index e3d89d6..9660128 100755 --- a/bin/autojump +++ b/bin/autojump @@ -60,7 +60,7 @@ from autojump_utils import sanitize from autojump_utils import take from autojump_utils import unico -VERSION = '22.2.3' +VERSION = '22.2.4' FUZZY_MATCH_THRESHOLD = 0.6 TAB_ENTRIES_COUNT = 9 TAB_SEPARATOR = '__'