以下脚本添加到fzf.zsh文件,.zshrc中引用 Changing directory # fd - cd to selected directory fd() { local dir dir=$(find ${1:-.} -path '*/\.*' -prune \ -o -type d -print 2> /dev/null | fzf +m) && cd "$dir" } # cda - including hidden directories cda() { local dir dir...
cp zsh-interactive-cd.plugin.zsh ~/.fzf/shell echo 'source ~/.fzf/shell/zsh-interactive-cd.plugin.zsh' >> ~/.zshrc cd后按ctrl-i就会打开fzf finder窗口 z # fasd & fzf change directory - jump using `fasd` if given argument, filter output of `fasd` using `fzf` else z() { [ $# ...
bash和zsh的模糊完备, 默认触发是**, 例如:vim **<TAB>, 或cd **<TAB>, 或ssh **<TAB>, 简直好用到飞起. # Files under the current directory# - You can select multiple items with TAB key vim**<TAB># Files under parent directory vim ../**<TAB># Files under parent directory that m...
# fd - cd to selected directory fd() { local dir dir=$(find ${1:-.} -path '*/\.*' -prune \ -o -type d -print 2> /dev/null | fzf +m) && cd "$dir" } 1. 2. 3. 4. 5. 6. 7. AI检测代码解析 # cda - including hidden directories cda() { local dir dir=$(find ...
bash和zsh的模糊完备, 默认触发是**, 例如:vim **<TAB>, 或cd **<TAB>, 或ssh **<TAB>, 简直好用到飞起. AI检测代码解析 # Files under the current directory # - You can select multiple items with TAB key vim **<TAB> # Files under parent directory ...
export FZF_COMPLETION_PATH_OPTS='--walker file,dir,follow,hidden' # 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 ...
cd `fd --type=directory | fzf` 如下是一个 cdg 的命令实现,可实现 cd 命令的任意目录的快速交互式搜索: alias cdg='cd_global() {cd $(fd --type directory $1 $2 | fzf)}; cd_global' 使用方式形如cdg pattern directory,在哪一个目录下查询包含 pattern 的目录,确认后即可 cd 进入到这个目录。
export FZF_COMPLETION_PATH_OPTS='--walker file,dir,follow,hidden' # 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 ...
# Set CTRL + f to call our function bindkey -s '^f' 'FzfViDir^M' function FzfViDir() { # Use fzf to get into the right folder. The ls command sends folder names to fzf cd $(ls -d */ | fzf) # Now fzf will only search the directory you have chosen vi $(fzf) }复制 收藏...
COMMAND[DIRECTORY/][FUZZY_PATTERN]**<TBA> 比如 vim **<TAB> vim ../mult**<TAB>cd~/github/fzf**<TBA> 预览窗口 如果使用--preview选项, fzf会自动用外部程序打开现在条目的文件, {}会被fzf选中行内容代替 fzf --preview'cat {}' 建议安装rougify(先安装ruby, 然后gem intall rouge) ...