diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-11-28 19:44:01 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-11-28 19:46:56 +0900 |
| commit | 61d10d8ffafa3e3dd80886bd46f24139f8265880 (patch) | |
| tree | 473dc4b806de6ab551bf40492cdc4a83f5eb688b | |
| parent | 7d9548919e9b1bb05bb95225275e34213a747cde (diff) | |
| download | fzf-61d10d8ffafa3e3dd80886bd46f24139f8265880.tar.gz | |
Update README and CHANGELOG
Close #4022
| -rw-r--r-- | CHANGELOG.md | 8 | ||||
| -rw-r--r-- | README.md | 37 |
2 files changed, 32 insertions, 13 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f3c52810..0312b938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ CHANGELOG ========= +0.57.0 +------ +- Built-in walker improvements + - `--walker-root` can take multiple directory arguments. e.g. `--walker-root include src lib` + - `--walker-skip` can handle multi-component patterns. e.g. `--walker-skip target/build` +- `FZF_PREVIEW_*` environment variables are exported to all child processes (#4098) +- Bug fixes in fish scripts + 0.56.3 ------ - Bug fixes in zsh scripts @@ -76,7 +76,8 @@ Table of Contents * [Process IDs](#process-ids) * [Host names](#host-names) * [Environment variables / Aliases](#environment-variables--aliases) - * [Settings](#settings) + * [Customizing fzf options for completion](#customizing-fzf-options-for-completion) + * [Customizing completion source for paths and directories](#customizing-completion-source-for-paths-and-directories) * [Supported commands](#supported-commands) * [Custom fuzzy completion](#custom-fuzzy-completion) * [Vim plugin](#vim-plugin) @@ -552,7 +553,7 @@ export **<TAB> unalias **<TAB> ``` -### Settings +### Customizing fzf options for completion ```sh # Use ~~ as the trigger sequence instead of the default ** @@ -561,21 +562,15 @@ export FZF_COMPLETION_TRIGGER='~~' # Options to fzf command export FZF_COMPLETION_OPTS='--border --info=inline' -# Use fd (https://github.com/sharkdp/fd) for listing path candidates. -# - The first argument to the function ($1) is the base path to start traversal -# - See the source code (completion.{bash,zsh}) for the details. -_fzf_compgen_path() { - fd --hidden --follow --exclude ".git" . "$1" -} +# Options for path completion (e.g. vim **<TAB>) +export FZF_COMPLETION_PATH_OPTS='--walker file,dir,follow,hidden' -# Use fd to generate the list for directory completion -_fzf_compgen_dir() { - fd --type d --hidden --follow --exclude ".git" . "$1" -} +# Options for directory completion (e.g. cd **<TAB>) +export FZF_COMPLETION_DIR_OPTS='--walker dir,follow' # Advanced customization of fzf options via _fzf_comprun function # - The first argument to the function is the name of the command. -# - You should make sure to pass the rest of the arguments to fzf. +# - You should make sure to pass the rest of the arguments ($@) to fzf. _fzf_comprun() { local command=$1 shift @@ -589,6 +584,22 @@ _fzf_comprun() { } ``` +### Customizing completion source for paths and directories + +```sh +# Use fd (https://github.com/sharkdp/fd) for listing path candidates. +# - The first argument to the function ($1) is the base path to start traversal +# - See the source code (completion.{bash,zsh}) for the details. +_fzf_compgen_path() { + fd --hidden --follow --exclude ".git" . "$1" +} + +# Use fd to generate the list for directory completion +_fzf_compgen_dir() { + fd --type d --hidden --follow --exclude ".git" . "$1" +} +``` + ### Supported commands On bash, fuzzy completion is enabled only for a predefined set of commands |
