Requires latest tmux built from source (e.g. brew install tmux --HEAD)
Examples:
# 50%/50% width and height on the center of the screen
fzf-tmux -p
# 80%/80%
fzf-tmux -p80%
# 80%/40%
fzf-tmux -p80%,40%
# Separate -w and -h
fzf-tmux -w80% -h40%
# 80%/40% at position (0, 0)
fzf-tmux -w80% -h40% -x0 -y0
You can configure key bindings and fuzzy completion to open in tmux
popup window like so:
FZF_TMUX_OPTS='-p 80%'
To make it easier to write more complex fzf options. Although this
does not break backward compatibility, users are encouraged to update
their code accordingly.
# Before
_fzf_complete "FZF_ARG1 FZF_ARG2..." "$@" < <(
# Print candidates
)
# After
_fzf_complete FZF_ARG1 FZF_ARG2... -- "$@" < <(
# Print candidates
)
This commit fixes a bug where lines that declare multiple hostnames get
omitted from completion entirely if one of the hostnames matches *. For
example:
Host foo.com bar.dev baz.*
While we can attach `_fzf_path_completion` or `_fzf_dir_completion` to
any command using the standard bash complete command, the functionality
of the existing completion function is lost.
Use _fzf_setup_completion if you want to extend the existing function
with fuzzy completion instead of completely replacing it.
e.g. _fzf_setup_completion path kubectl
This change is not required if you use the install script to generate
~/.fzf.bash or ~/.fzf.zsh which already has the proper guard statement.
Close#1474
* 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 **`
* [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**
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.
_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.
Handle uppercase letters in program names. This also deals with `-` and
`.`, both of which are quite common in program names, e.g., `xdg-open`
and `foo.sh`.