Skip to content

Commit

Permalink
add -e to fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
skywind3000 committed Feb 17, 2019
1 parent f638730 commit 2e658dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions z.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2e658dd

Please sign in to comment.