* 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.
* [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**
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)
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
When `ps` is aliased for something uncommon, like `alias ps=grc ps` which colorizes ps output, the output of `ps` can be unexpected and/or undesired.
This change makes ps to be always executed as command, even if it's aliased.
Handles records like "[20.20.7.168]:9722 ssh-rsa ..."
This is a standard format for servers running on custom port according to http://man.openbsd.org/sshd.8#SSH_KNOWN_HOSTS_FILE_FORMAT
A hostname or address may optionally be enclosed within ‘[’ and ‘]’
brackets then followed by ‘:’ and a non-standard port number.
* Don't do shell quoting for weird chars
This would prevent tabs from being escaped as `$'\t'` (definitely not what I would want to see as initial value in the search).
* Do different escape.
This also modifies <C-t> behaviour.
The longest file path in the input is used as root directory for `find`
command. The remainder of the input is passed to fzf's --query as a
initial search parameters.
If "." is given as the argument to begin <C-t> completion, the leading
"." is not correctly removed. In general, if user selects a fzf
completion, the current token should be "consumed".
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.
_fzf_completion_loaded is no longer checked. This change increases the
load time by a few milliseconds, but I can't think of a better way to
handle the issue.
Close#783.
Replace the "temp file" workaround with the "read" function: it's
simpler and faster.
Use proper escaping, remove the custom function.
The "file" widget uses last token as root for the "find" command.
This replaces the equivalent of '**' completion in bash/zsh.
The "$dir" non-expanded variable can be used in FZF_CTRL_T_COMMAND to
set the root.