Skip to content

Commit 2e658dd

Browse files
author
skywind3000
committed
add -e to fzf
1 parent f638730 commit 2e658dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Of course, you can always give more keywords to `z` command to match your destin
276276

277277
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.
278278

279-
`"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.
279+
`"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.
280280

281281
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.
282282

@@ -457,7 +457,7 @@ As you see, z.lua is the fastest one and requires less resource.
457457

458458
## History
459459

460-
- 1.5.3 (2019-02-17): environment variable parsing is flaky, new `$_ZL_FZF_FLAG`.
460+
- 1.5.3 (2019-02-17): new `$_ZL_FZF_FLAG` for passing additional flags to fzf, add `-e` argument to fzf.
461461
- 1.5.2 (2019-02-16): be aware of all arguments in fzf completion.
462462
- 1.5.1 (2019-02-15): new: simulated dir stack by `z -`, `z --` and `z -{num}`.
463463
- 1.5.0 (2019-02-14): fixed minor issues in backward jumping.

z.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ function z_cd(patterns)
14391439
elseif Z_INTERACTIVE == 2 then
14401440
local fzf = os.environ('_ZL_FZF', 'fzf')
14411441
local tmpname = '/tmp/zlua.txt'
1442-
local cmd = '--nth 2.. --reverse --inline-info +s --tac'
1442+
local cmd = '--nth 2.. --reverse --inline-info +s --tac -e'
14431443
cmd = ((fzf == '') and 'fzf' or fzf) .. ' ' .. cmd
14441444
cmd = cmd .. ' ' .. os.environ('_ZL_FZF_FLAG', '') .. ' '
14451445
if not windows then
@@ -1987,7 +1987,7 @@ function z_shell_init(opts)
19871987
end
19881988
print(script_complete_bash)
19891989
if opts.fzf ~= nil then
1990-
fzf_cmd = "fzf --nth 2 --reverse --inline-info +s --tac"
1990+
fzf_cmd = "fzf --nth 2 --reverse --inline-info +s --tac -e"
19911991
if not os.environ('_ZL_FZF_FULLSCR', false) then
19921992
fzf_cmd = fzf_cmd .. ' --height 35%'
19931993
end

0 commit comments

Comments
 (0)