Skip to content

Naming Convention

Every my-fzf command follows a consistent naming pattern:

f + scope + action + [type] + [variant/extension]

The f prefix stands for fzf. Everything after it describes what the command does.

The scope determines where the command searches.

ScopeLetterPath
Current directoryc. (cwd)
Repository rootrGit repo root, or . if not in a repo
Globalg$HOME

The action determines what the command does with the results.

LettersActionTool
fFind filefd + fzf
dFind directoryfd + fzf
nOpen in nvimfd + fzf + nvim
bPreview with batfd + fzf + bat
zcd with zoxidezoxide + fzf
gGreprg + fzf
gbGrep + previewrg + fzf + bat
gnGrep + open in nvimrg + fzf + nvim

Variants modify how fd and rg search.

SuffixMeaningfd/rg flags
-hInclude hidden files--hidden
-niNo gitignore (show ignored files)--no-ignore
-hniBoth hidden and no-ignore--hidden --no-ignore

Extension suffixes filter results to specific file types.

SuffixExtensions matched
md.md
ts.ts, .tsx, .mts, .cts
js.js, .jsx, .mjs, .cjs
json.json, .jsonc
sh.sh, .bash, .zsh
css.css, .scss, .sass, .less
svelte.svelte
astro.astro
html.html, .htm
toml.toml

File operation commands add an operation prefix before the type.

LettersOperation
rmfRemove file
rmdRemove directory
mvfMove file(s)
mvdMove directory
cpfCopy file(s)
cpdCopy directory
rnfRename file
rndRename directory

Reading a command name left to right:

CommandBreakdownMeaning
fcff + c + ffzf + cwd + find file
frff + r + ffzf + repo + find file
fgnf + g + nfzf + global + open in nvim
fcg-hf + c + g + -hfzf + cwd + grep + hidden
frftsf + r + f + tsfzf + repo + find file + TypeScript
fcrmfmdf + c + rmf + mdfzf + cwd + remove file + markdown