* Correctly exclude SSH config options with Host
SSH config files have 14 options containing 'Host'.
Previously The zsh and bash completion scripts would include lines
containing these options when doing command-line completion of SSH hosts
with `ssh **`.
This commit fixes that problem by only including lines with 'host '.
* Don't autocomplete SSH hostnames using ?
SSH config files support ? as well as * for wildcards in Host lines.
This commit excludes lines containing ? for zsh/bash command line
completeion using `ssh **`
$FISH_VERSION is dropped in 2.7, but every version has $version
- https://github.com/fish-shell/fish-shell/issues/4414
- fb8ae04f80
Comment from @faho in #1316:
Unfortunately, $FISH_VERSION was only ever a thing from fish 2.0 to fish 2.7.1.
All fish versions from the very beginning though used a variable called simply "$version" to store their version, so that is the one that should be used.
- 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
* [bash/zsh] Fix missing fuzzy completions
`cat foo**<TAB>` did not display the file `foobar` if there was a directory
named `foo`.
Fixes#1301
* [zsh] Evaluate completion prefix
cat $HOME**
cat ~username**
cat ~username/foo**
fzf-tmux temporarily turns off remain-on-exit and synchronize-panes
options. We don't have to try to restore the values of the options if
they were already turned off when fzf-tmux was started.
fzf used to print non-displayable characters (ascii code < 32) as '?',
but we will simply ignore those characters with this patch, just like
our terminals do.
\n and \r are exceptions. They will be printed as a space character.
TODO: \H should delete the preceding character, but this is not implemented.
Related: #1253
Add String() methods to types, so they can be printed with %s. Change
some %s format specifiers to %v, when the default string representation
is good enough. In Go 1.10, `go test` triggers a parallel `go vet`. So
this also makes fzf pass `go test`.
Close#1236Close#1219
Close#1216
1. Append a single space so that step 3 won't fail
2. CTRL-E to move to the end of the line
3. CTRL-U to delete the whole line before the cursor
4. CTRL-Y to paste the deleted line
5. ESC+Y to rotate the kill ring and bring back the previous yank before step 3
6. CTRL-U to delete the whole line again
7. Paste `__fzf_history__`
8. ESC+CTRL-E to expand the command substitution
9. ESC+R to redraw the line
10. ESC+^ to expand the history entry (!NUMBER)
I've decided not to take more donations.
Thanks to everyone who has supported my projects.
Edgar Hipp
Eyal Levin
Philip Stewart
James O'Beirne
Minh Triet Ly
Victor Alvarez
Max Hung
Gearoid Murphy
Aaron Taylor
Brett Bender
Phil Thompson
Anders Damsgaard
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