1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-07-03 03:10:48 +00:00

add -e to fzf

This commit is contained in:
skywind3000
2019-02-17 17:51:03 +08:00
parent f638730d5f
commit 2e658dd379
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -276,7 +276,7 @@ Of course, you can always give more keywords to `z` command to match your destin
Usually, `z -I` can be aliased to `zf` (z + fuzzy finder) for convenience. If there are only one path matched, `z -I` will jump to it directly, fzf will only be invoked for multiple matches.
`"z -I ."` or `"zf ."` can be used to use fzf select from entire database. Environment variable `_ZL_FZF_FLAG` is for passing additional arguments to fzf, you can try to set it to `-e` to use `exact` matching mode in fzf.
`"z -I ."` or `"zf ."` can be used to use fzf select from entire database. Environment variable `_ZL_FZF_FLAG` is for passing additional arguments to fzf.
NOTE: For fish shell, this feature requires fish 2.7.0 or above. You can specify fzf executable in `$_ZL_FZF` environment variable, `"fzf"` will be called by default.
@@ -457,7 +457,7 @@ As you see, z.lua is the fastest one and requires less resource.
## History
- 1.5.3 (2019-02-17): environment variable parsing is flaky, new `$_ZL_FZF_FLAG`.
- 1.5.3 (2019-02-17): new `$_ZL_FZF_FLAG` for passing additional flags to fzf, add `-e` argument to fzf.
- 1.5.2 (2019-02-16): be aware of all arguments in fzf completion.
- 1.5.1 (2019-02-15): new: simulated dir stack by `z -`, `z --` and `z -{num}`.
- 1.5.0 (2019-02-14): fixed minor issues in backward jumping.
+2 -2
View File
@@ -1439,7 +1439,7 @@ function z_cd(patterns)
elseif Z_INTERACTIVE == 2 then
local fzf = os.environ('_ZL_FZF', 'fzf')
local tmpname = '/tmp/zlua.txt'
local cmd = '--nth 2.. --reverse --inline-info +s --tac'
local cmd = '--nth 2.. --reverse --inline-info +s --tac -e'
cmd = ((fzf == '') and 'fzf' or fzf) .. ' ' .. cmd
cmd = cmd .. ' ' .. os.environ('_ZL_FZF_FLAG', '') .. ' '
if not windows then
@@ -1987,7 +1987,7 @@ function z_shell_init(opts)
end
print(script_complete_bash)
if opts.fzf ~= nil then
fzf_cmd = "fzf --nth 2 --reverse --inline-info +s --tac"
fzf_cmd = "fzf --nth 2 --reverse --inline-info +s --tac -e"
if not os.environ('_ZL_FZF_FULLSCR', false) then
fzf_cmd = fzf_cmd .. ' --height 35%'
end