Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: Aloxaf/fzf-tab, 5.0k sao, Shell. Replace zsh's default completion selection menu with fzf!
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Ctrl+Space: select multiple results, can be configured by fzf-bindings tag
F1/F2: switch between groups, can be configured by switch-group tag
/: trigger continuous completion (useful when completing a deep path), can be configured by continuous-trigger tag
Available commands:
disable-fzf-tab: disable fzf-tab and fallback to compsys
enable-fzf-tab: enable fzf-tab
toggle-fzf-tab: toggle the state of fzf-tab. This is also a zle widget.
Configure
A common configuration is:
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
# NOTE: don't use escape sequences (like '%F{red}%d%f') here, fzf-tab will ignore them
zstyle ':completion:*:descriptions' format '[%d]'
# set list-colors to enable filename colorizing
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# force zsh not to show completion menu, which allows fzf-tab to capture the unambiguous prefix
zstyle ':completion:*' menu no
# preview directory's content with eza when completing cd
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
# custom fzf flags
# NOTE: fzf-tab does not follow FZF_DEFAULT_OPTS by default
zstyle ':fzf-tab:*' fzf-flags --color=fg:1,fg+:2 --bind=tab:accept
# To make fzf-tab follow FZF_DEFAULT_OPTS.
# NOTE: This may lead to unexpected behavior since some flags break this plugin. See Aloxaf/fzf-tab#455.
zstyle ':fzf-tab:*' use-fzf-default-opts yes
# switch group using `<` and `>`
zstyle ':fzf-tab:*' switch-group '<' '>'
Tmux
If you're using tmux >= 3.2, we provide a script ftb-tmux-popup to make full use of it's "popup" feature.
zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
BTW, you can also use this script outside the fzf-tab.
ls | ftb-tmux-popup
For more information, please see Wiki#Configuration.
Binary module
By default, fzf-tab uses zsh-ls-colors to parse and apply ZLS_COLORS if you have set the list-colors tag.
However, it is a pure zsh script and is slow if you have too many files to colorize.
fzf-tab is shipped with a binary module to speed up this process. You can build it with build-fzf-tab-module, then it will be enabled automatically.
Difference from other plugins
fzf-tab doesn't do "complete", it just shows you the results of the default completion system.
So it works EVERYWHERE (variables, function names, directory stack, in-word completion, etc.).
And most of your configuration for default completion system is still valid.
Compatibility with other plugins
Some plugins may also bind "^I" to their custom widget, like fzf/shell/completion.zsh or ohmyzsh/lib/completion.zsh.
By default, fzf-tab will call the widget previously bound to "^I" to get the completion list. So there is no problem in most cases, unless fzf-tab is initialized before a plugin which doesn't handle the previous binding properly.
So if you find your fzf-tab doesn't work properly, please make sure it is the last plugin to bind "^I" (If you don't know what I mean, just put it to the end of your plugin list).
Related projects
https://github.com/lincheney/fzf-tab-completion (fzf tab completion for zsh, bash and GNU readline apps)
Aloxaf/fzf-tab có 5.0k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/Aloxaf/fzf-tab. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
Aloxaf/fzf-tab có phải mã nguồn mở không?
Có — Aloxaf/fzf-tab phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/Aloxaf/fzf-tab.
Aloxaf/fzf-tab có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho Aloxaf/fzf-tab. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
Aloxaf/fzf-tab là gì?
Aloxaf/fzf-tab (Aloxaf/fzf-tab) là dự án Shell trên GitHub. Theo mô tả gốc: Replace zsh's default completion selection menu with fzf!
Đọc thêm về Aloxaf/fzf-tab ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Aloxaf/fzf-tab là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc fzf-tab có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về fzf-tab.