summaryrefslogtreecommitdiff
path: root/shell/completion.bash
AgeCommit message (Collapse)Author
2017-07-31Revert "[bash] Do not append space when path completion is cancelled"Junegunn Choi
This reverts commit 376a76d1d3c39a1686b6ac7a6118c1f80af3178e as it affects normal completion
2017-07-30[bash] Do not append space when path completion is cancelledJunegunn Choi
Close #990
2017-04-11[bash-completion] Use -o dirnames instead of -o plusdirsJunegunn Choi
Close #903 Related #135
2017-03-21Add support for IPv6 addresses in ssh completion (#877)Sam Van Den Berge
Signed-off-by: Sam Van Den Berge <sam@drgt.net>
2017-01-15[completion] Restore --height option for kill completionJunegunn Choi
2017-01-15[shell] Make layout configurable via $FZF_DEFAULT_OPTS and $FZF_{KEY}_OPTSJunegunn Choi
2017-01-15[completion] Add preview window to kill completionJunegunn Choi
2017-01-15Replace --normalize with --literal and enable normalization by defaultJunegunn Choi
Ref #790
2017-01-14Fix $FZF_COMPLETION_OPTS evaluationJunegunn Choi
Close #799
2017-01-08Add --height optionJunegunn Choi
2017-01-07[bash/zsh-completion] Filter ~/.ssh/known_hostsJunegunn Choi
Close #791
2016-12-31[bash-completion] Always backup existing completion definitionsJunegunn Choi
_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.
2016-09-24Fix #668Maverick Woo
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`.
2016-07-07[shell] Suppress alias/function expansionJunegunn Choi
Close #611
2016-06-02[bash/zsh] Take SSH completion hints from known_hostsJim Howell
Signed-off-by: Junegunn Choi <junegunn.c@gmail.com>
2016-04-23Update completion.bashGene Pavlovsky
Fixes #548. Avoid using a subshell in _fzf_defc().
2016-03-02[bash] Fix shellcheck warningsJunegunn Choi
Close #516
2016-02-070.11.3Junegunn Choi
2016-01-29[completion] _fzf_complete_COMMAND_post for post processingJunegunn Choi
e.g. _fzf_complete_foo() { _fzf_complete "--multi --reverse --header-lines=3" "$@" < <( ls -al ) } _fzf_complete_foo_post() { awk '{print $NF}' } [ -n "$BASH" ] && complete -F _fzf_complete_foo -o default -o bashdefault foo
2016-01-20Make fuzzy completion customizable with _fzf_compgen_{path,dir}Junegunn Choi
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)
2015-12-28Fix autocompletion for absolute pathsKobe Lipkens
2015-12-29[bash/zsh-completion] List hidden files as wellJunegunn Choi
Close #456 and #457
2015-11-12[bash-completion] Fix #417 - Update command listJunegunn Choi
2015-11-06[bash-completion] Add nvim to f_cmdsLeandro Freitas
2015-11-03Make --extended defaultJunegunn Choi
Close #400
2015-10-12[bash-completion] Retain original completion options (#288)Junegunn Choi
2015-10-05[completion] Revamp completion APIJunegunn Choi
* _fzf_complete is the helper function for custom completion * _fzf_complete FZF_OPTS ARGS * Reads the output of the source command instead of the command string * In zsh, you can use pipe to feed the data into the function, but it's not possible in bash as by doing so COMPREPLY is set from the subshell and thus nullified * Change the naming convention for consistency: * _fzf_complete_COMMAND e.g. # pass completion suggested by @d4ndo (#362) _fzf_complete_pass() { _fzf_complete '+m' "$@" < <( local pwdir=${PASSWORD_STORE_DIR-~/.password-store/} local stringsize="${#pwdir}" find "$pwdir" -name "*.gpg" -print | cut -c "$((stringsize + 1))"- | sed -e 's/\(.*\)\.gpg/\1/' ) } # Only in bash complete -F _fzf_complete_pass -o default -o bashdefault pass
2015-10-05[zsh-completion] Allow custom completion functionJunegunn Choi
While in bash you can externally register custom completion functions using `complete` command, it was not possible to do so in zsh without changing completion.zsh as the name of the supported commands are hard-coded within the code (See #362). With this commit, fzf-completion of zsh will first look if `_fzf_COMMAND_completion` exists and calls the function, so one can externally define completion functions for specific commands. This commit also tries to make the interface of (yet undocumented) _fzf_list_completion helper function consistent across bash and zsh. So the following code works both on bash and zsh. _fzf_pass_completion() { local pwdir=${PASSWORD_STORE_DIR-~/.password-store/} local stringsize="${#pwdir}" let "stringsize+=1" _fzf_list_completion '+m' "$@" << "EOF" find "$pwdir" -name "*.gpg" -print | cut -c "$stringsize"- | sed -e 's/\(.*\)\.gpg/\1/' EOF } # Only on bash complete -F _fzf_pass_completion -o default -o bashdefault pass Note that the suggested convention and the interface are not yet final and subject to change. /cc @d4ndo
2015-09-15Replace --header-file with --header (#346)Junegunn Choi
and allow using --header and --header-lines at the same time. Close #346.
2015-07-26Add --margin optionJunegunn Choi
Close #299
2015-07-23[bash] Update fzf option completionJunegunn Choi
2015-07-04Fix g++: possible retry loopEvgeny Vereshchagin
See http://unix.stackexchange.com/q/213432/120177
2015-06-210.10.0Junegunn Choi
2015-06-14Add support for search historyJunegunn Choi
- Add `--history` option (e.g. fzf --history ~/.fzf.history) - Add `--history-max` option for limiting the size of the file (default 1000) - Add `previous-history` and `next-history` actions for `--bind` - CTRL-P and CTRL-N are automatically remapped to these actions when `--history` is used Closes #249, #251
2015-05-210.9.12Junegunn Choi
2015-05-11[zsh/bash-completion] Avoid caret expansionJunegunn Choi
Close #233 setopt extendedglob on zsh caused caret in grep pattern to be expanded. Problem identified and patch submitted by @lazywei.
2015-05-11[bash-completion] Allow specifying empty completion trigger (#230)Junegunn Choi
2015-05-08[bash-completion] Ignore 0.0.0.0Junegunn Choi
Close #228
2015-04-23Update completion for fzf itselfJunegunn Choi
2015-04-16Prepare for 0.9.9 releaseJunegunn Choi
2015-04-14FZF_TMUX and FZF_TMUX_HEIGHT for fuzzy completionJunegunn Choi
2015-04-14Fuzzy completion using fzf-tmuxJunegunn Choi
2015-03-13Refactor shell extensionsJunegunn Choi
- Use symlinks instead of generating the full content - Update fish_user_paths and remove ~/.config/fish/functions/fzf.fish - Create wrapper script for fzf when Ruby version and use it instead of exported function not to break fzf-tmux