Skip to content

Commit b691d53

Browse files
author
skywind3000
committed
z -b should not match current directory, close #56
1 parent 472925a commit b691d53

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ As you see, z.lua is the fastest one and requires less resource.
458458

459459
## History
460460

461+
- 1.5.9 (2019-02-25): `z -b` should not match current directory (close #56).
461462
- 1.5.8 (2019-02-21): new `$_ZL_FZF_HEIGHT` to control `--height` parameter in fzf.
462463
- 1.5.7 (2019-02-21): rename `$_ZL_FZF_SORT` to `$_ZL_INT_SORT` it will affect both `-i` and `-I`.
463464
- 1.5.6 (2019-02-20): set `$_ZL_FZF_SORT` to 1 to sort directories by alphabet in fzf.

z.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- z.lua - a cd command that learns, by skywind 2018, 2019
55
-- Licensed under MIT license.
66
--
7-
-- Version 1.5.8, Last Modified: 2019/02/21 12:08
7+
-- Version 1.5.9, Last Modified: 2019/02/25 23:17
88
--
99
-- * 10x faster than fasd and autojump, 3x faster than z.sh
1010
-- * available for posix shells: bash, zsh, sh, ash, dash, busybox
@@ -1555,6 +1555,7 @@ function cd_backward(args, options, pwd)
15551555
end
15561556
return os.path.normpath(path)
15571557
else
1558+
pwd = os.path.split(pwd)
15581559
local test = windows and pwd:gsub('\\', '/') or pwd
15591560
local key = windows and args[1]:lower() or args[1]
15601561
if not key:match('%u') then

0 commit comments

Comments
 (0)