mirror of
https://github.com/skywind3000/z.lua
synced 2026-03-24 08:39:49 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23aeabedd9 | ||
|
|
27dceb9899 | ||
|
|
19b2d1747e |
4
z.lua
4
z.lua
@@ -4,7 +4,7 @@
|
|||||||
-- z.lua - a cd command that learns, by skywind 2018-2022
|
-- z.lua - a cd command that learns, by skywind 2018-2022
|
||||||
-- Licensed under MIT license.
|
-- Licensed under MIT license.
|
||||||
--
|
--
|
||||||
-- Version 1.8.22, Last Modified: 2025/05/17 13:54:38
|
-- Version 1.8.23, Last Modified: 2025/05/18 00:18:20
|
||||||
--
|
--
|
||||||
-- * 10x faster than fasd and autojump, 3x faster than z.sh
|
-- * 10x faster than fasd and autojump, 3x faster than z.sh
|
||||||
-- * available for posix shells: bash, zsh, sh, ash, dash, busybox
|
-- * available for posix shells: bash, zsh, sh, ash, dash, busybox
|
||||||
@@ -1979,7 +1979,7 @@ function main(argv)
|
|||||||
path = z_cd(args)
|
path = z_cd(args)
|
||||||
if path == nil and Z_MATCHMODE ~= 0 then
|
if path == nil and Z_MATCHMODE ~= 0 then
|
||||||
local last = args[#args]
|
local last = args[#args]
|
||||||
if os.path.isdir(last) then
|
if last and os.path.isdir(last) then
|
||||||
path = os.path.abspath(last)
|
path = os.path.abspath(last)
|
||||||
path = os.path.norm(path)
|
path = os.path.norm(path)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user