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%'
At the top of each zsh file options are set to their
standard values (those marked with <Z> in `man zshoptions`)
and `aliases` option is disabled.
At the bottom of the file the original options are restored.
Fix#1938
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.*
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**
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.
The command substitution and following word splitting to determine the default
zle widget for ^I formerly only works if the IFS parameter contains a space. Now
it specifically splits at spaces, regardless of IFS.
zle automatically calls zle-line-init when it starts to read a new line. Many
Zsh setups use this hook to set the terminal into application mode, since this
will then allow defining keybinds based on the $terminfo variable (the escape
codes in said variable are only valid in application mode).
However, fzf resets the terminal into raw mode, rendering $terminfo values
invalid once the widget has finished. Accordingly, keyboard bindings defined
via $terminfo won’t work anymore.
This fixes the issue by calling zle-line-init when widgets finish. Care is taken
to not call this widget when it is undefined.
Fixes#279
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)