- Update preview window even if there is no match for the query string
if any of the placeholder expressions evaluates to a non-empty string.
- Also, if the command template contains {q}, preview window will be
updated if the query string changes even though the focus remains on
the same item.
An example:
git log --oneline --color=always |
fzf --reverse --ansi --preview \
'[ -n {1} ] && git show --color=always {1} || git show --color=always {q}'
Close#1307
After _completion_loader is called, instead of loading the entire
completion.bash file, just restore the fzf completion for the current
command. `_fzf_orig_completion_$cmd` is only set if _completion_loader
actually changed the completion options to avoid infinite loop.
Close#1170
'accept-non-empty' is similar to 'accept' (which is bound to 'enter' and
'double-click' by default) but it prevents fzf from exiting without any
selection.
Close#1162
replace-query action replaces the query string with the current
selection. If the selection is too long, it will be truncated.
If the line contains meta-characters of fzf search syntax, it is
possible that the line is no longer included in the updated result.
e.g.
echo '!hello' | fzf --bind ctrl-v:replace-query
Close#1137
One can escape meta characters in extended-search mode with backslashes.
Prefixes:
\'
\!
\^
Suffix:
\$
Term separator:
\<SPACE>
To keep things simple, we are not going to support escaping of escaped
sequences (e.g. \\') for matching them literally.
Since this is a breaking change, we will bump the minor version.
Close#444
Make sure to consistently calculate tiebreak scores based on the
original line.
This change may not be preferable if you filter aligned tabular input on
a subset of columns using --nth. However, if we calculate length
tiebreak only on the matched components instead of the entire line, the
result can be very confusing when multiple --nth components are
specified, so let's keep it simple and consistent.
Close#926
CTRL-R binding used to start with --no-sort to list the matched commands
in chronological order. However, it has been a constant source of
confusion. Let's enable it by default from now on. The sorted result
shouldn't be too confusing as we use --tiebreak=index.
- Fix display of CJK wide characters
- Fix horizontal offset of header lines
- Add support for keys with ALT modifier, shift-tab, page-up and down
- Fix util.ExecCommand to properly parse command-line arguments
- Fix redraw on resize
- Implement Pause/Resume for execute action
- Remove runtime check of GOOS
- Change exit status to 2 when tcell failed to start
- TBD: Travis CI build for tcell renderer
- Pending. tcell cannot reliably ingest keys from tmux send-keys
When we prepend a single quote to our query in --exact mode, we are not
supposed to limit the scope of the new search to the previous
exact-match result.
Based on the patch by Matt Westcott (@mjwestcott).
But with a more conservative approach:
- Does not use linearly increasing penalties; It is agreed upon that we
should prefer matching characters at the beginnings of the words, but
it's not always clear that the relevance is inversely proportional to
the distance from the beginning.
- The approach here is more conservative in that the bonus is never
large enough to override the matchlen, so it can be thought of as the
first implicit tiebreak criterion.
- One may argue the change breaks the contract of --tiebreak, but the
judgement depends on the definition of "tie".
Note that $SHELL only points to the default shell instead of the current
shell. If you're on a non-default shell, you might want to override the
value like follows.
SHELL=zsh fzf --bind 'enter:execute:echo $ZSH_VERSION; sleep 1'
Notes:
- You can now override _fzf_compgen_path and _fzf_compgen_dir functions
to use custom commands such as ag instead of find for listing
completion candidates.
- The first argument is the base path to start traversal
- Removed file-only completion in bash, i.e. _fzf_file_completion.
Maintaining a list of commands that only expect files, not
directories, is cumbersome (there are too many) and error-prone.
TBD:
- Added $FZF_COMPLETION_DIR_COMMANDS to customize the list of commands
which use directory-only completion. The default is "cd pushd rmdir".
Not sure if it's the best approach to address the requirement, I'll
leave it as an undocumented feature.
Related: #406 (@thomcom), #456 (@frizinak)
This change improves sort ordering for aligned tabular input.
Given the following input:
apple juice 100
apple pie 200
fzf --nth=2 will now prefer the one with pie. Before this change fzf
compared "juice " and "pie ", both of which have the same length.