Skip to content

Commit

Permalink
feat: add fzf options
Browse files Browse the repository at this point in the history
- FZF_DEFAULT_COMMAND: fzf コマンド押下時の動作(デフォルトは find)
- FZF_CTRL_T_COMMAND: <C-t> コマンド押下時の動作(ファイル名補完)

find を rg(ripgrep) コマンドに置き換える。

--files: ファイルリストを出力
--hidden: 隠しファイル対象
--follow: シンボリックリンクは実態まで追う
--glob '!.git': (隠しファイルは対象にするが).git 配下は無視する

refs. [fzfによるCUI生活の改善](https://blog.nijohando.jp/post/fzf-fish-vim/)
refs. //github.com/BurntSushi/ripgrep/issues/340#issuecomment-280868119
  • Loading branch information
onigiri10co committed Mar 15, 2022
1 parent abf2239 commit f375f28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/fzf/.zsh.d/fzf.zshrc.env
@@ -1,2 +1,3 @@
export FZF_DEFAULT_OPTS="-0 --inline-info --cycle"

export FZF_DEFAULT_COMMAND='rg --files --hidden --follow --glob "!.git"'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
1 change: 1 addition & 0 deletions roles/fzf/dependencies
@@ -1,2 +1,3 @@
homebrew
git
ripgrep

0 comments on commit f375f28

Please sign in to comment.