diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-04-28 21:55:51 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-04-28 21:55:51 +0300 |
commit | a84b534c409fcfa7e485b250c8f9db4e50779d3e (patch) | |
tree | be5e625d86cf8ad86e7c5d463d3ff31cc3878d13 /git-prompt.sh | |
parent | Indicator if your branch is behind origin (diff) | |
download | git-prompt-a84b534c409fcfa7e485b250c8f9db4e50779d3e.tar.gz git-prompt-a84b534c409fcfa7e485b250c8f9db4e50779d3e.tar.bz2 git-prompt-a84b534c409fcfa7e485b250c8f9db4e50779d3e.zip |
fixed: autojump was selecting oldest (not most recent) dirs
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 9429743..6d000ba 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -634,8 +634,7 @@ enable_set_shell_label() { j (){ : ${1? usage: j dir-beginning} # go in ring buffer starting from current index. cd to first matching dir - for (( i=(aj_idx+1)%aj_max; i != aj_idx%aj_max; i=++i%aj_max )) ; do - #echo == ${aj_dir_list[$i]} == $i + for (( i=(aj_idx-1)%aj_max; i != aj_idx%aj_max; i=(--i+aj_max)%aj_max )) ; do if [[ ${aj_dir_list[$i]} =~ ^.*/$1[^/]*$ ]] ; then cd "${aj_dir_list[$i]}" return |