new initializer

This commit is contained in:
skywind3000
2019-01-17 22:45:52 +08:00
parent a6e3c5d9c7
commit 10bd804a03
+6 -3
View File
@@ -4,7 +4,7 @@
-- z.lua - z.sh implementation in lua, by skywind 2018, 2019 -- z.lua - z.sh implementation in lua, by skywind 2018, 2019
-- Licensed under MIT license. -- Licensed under MIT license.
-- --
-- Version 36, Last Modified: 2019/01/13 00:14 -- Version 37, Last Modified: 2019/01/17 22:37
-- --
-- * 10x times faster than fasd and autojump -- * 10x times faster than fasd and autojump
-- * 3x times faster than rupa/z -- * 3x times faster than rupa/z
@@ -21,6 +21,7 @@
-- * z -c foo # restrict matches to subdirs of $PWD -- * z -c foo # restrict matches to subdirs of $PWD
-- * z -e foo # echo the best match, don't cd -- * z -e foo # echo the best match, don't cd
-- * z -x path # remove path from history -- * z -x path # remove path from history
-- * z -i foo # cd with interactive selection
-- --
-- Bash Install: -- Bash Install:
-- * put something like this in your .bashrc: -- * put something like this in your .bashrc:
@@ -57,8 +58,7 @@
-- set $_ZL_CD to specify your own cd command -- set $_ZL_CD to specify your own cd command
-- set $_ZL_ECHO to 1 to display new directory name after cd. -- set $_ZL_ECHO to 1 to display new directory name after cd.
-- set $_ZL_MAXAGE to define a aging threshold (default is 5000). -- set $_ZL_MAXAGE to define a aging threshold (default is 5000).
-- set $_ZL_MATCH_NAME to 1 to force match the last segment of the path. -- set $_ZL_MATCH_MODE to 1 to enable enhanced matching mode.
-- set $_ZL_SKIP_PWD to 1 to skip current directory ($PWD).
-- --
--===================================================================== --=====================================================================
@@ -1455,6 +1455,9 @@ function z_shell_init(opts)
print('fi') print('fi')
end end
end end
if opts.enhanced ~= nil then
print('export _ZL_MATCH_MODE=1')
end
end end