ZF(1)
π zf(1) β the fuzzy finder bestie π
okay so this is the manual page for zf, a general commands manual entry, and honestly? she's that girl. let's get into it π«Ά
β¨ NAME β¨
zf β a commandline fuzzy finder that prioritizes matches on filenames π
πΈ SYNOPSIS πΈ
zf [options]
that's it. that's the whole vibe check. π
π¦ DESCRIPTION π¦
zf is a simple, general-purpose fuzzy finder, and her whole personality trait is that she prioritizes matches on filenames. iconic behavior, no notes. β¨
she reads a list of newline separated strings on stdin and pops open an interactive interface. hit enter and the selected line goes out on stdout, boom, done. you can also type text to filter the list of strings, which is lowkey the whole point. π
you can mark multiple lines as selected with tab and shift-tab (yes, both, she's flexible). when multiple lines are selected and you press enter, only the marked lines get written to stdout. periodt.
each whitespace-separated term in the query string gets used separately to narrow down the search results. for example, searching for "init config" will select all results that match both "init" and "config". so like, both things have to be true, it's giving AND logic. π§
heads up bestie: the query is restricted to a maximum of 16 whitespace-separated tokens. sixteen. that's the limit. don't push her. π
matching is case insensitive unless there's an uppercase letter found in the query β then she starts caring about case, main character energy. π
π OPTIONS π
-d,--delimiterβ set the delimiter used to split candidates (default\n)-0β shorthand for-d'\0'to split on null bytes π«Ά-f,--filterβ skip interactive use and filter using the given query (no UI, just vibes and output)--heightβ the height of the interface in rows (default10)-k,--keep-orderβ don't sort by rank and preserve order of lines read on stdin. this makeszfremove any lines that don't match, but the order of lines will not change. lowkey respectful of your input ngl π-l,--linesβ alias of--height. deprecated and will be removed in version1.0.0. she's on her way out, say your goodbyes π-p,--plainβ treat input as plaintext and disable filepath matching features. useful when the input lines are not file paths. not everything is a path, bestie π--previewβ executes a command substituting{}with the current selected line and displays the output in a side column. very demure, very side-column. β¨--preview-widthβ sets the preview column width (default60%)-v,--versionβ show version information and exit-h,--helpβ display help and exit
π ENV VARIABLES π
ZF_PROMPTβ override the default>prompt by assigning a string to this variable. for exampleexport ZF_PROMPT="$ ". make it yours, bestie πZF_HIGHLIGHTβ set the color used to highlight matches. valid colors are:black,red,green,yellow,blue,magenta,cyan,whitebright_black,bright_red,bright_green,bright_yellow,bright_blue,bright_magenta,bright_cyan, andbright_white. the default color iscyan. the bright ones are literally so extra, obsessed πZF_VI_MODEβ when this variable is present and not emptyctrl+kmoves up a line. when disabledctrl+kdeletes from the cursor to the end of line. two completely different personalities depending on one env var, iykyk πNO_COLORβ disables colors. seehttps://no-color.org. some of y'all hate fun and that's valid πΈ
β COMMANDS β
enterβ write the selected line or all marked lines to stdout and exitescape,ctrl-cβ exitzfwithout selecting anything (the dramatic exit, no commitment π)up,ctrl-p,ctrl-kβ select the next line updownctrl-n,ctrl-jβ select the next line downtabβ mark the current line as selected and select the next lineshift-tabβ mark the current line as selected and select the previous lineleft,ctrl-bβ move the cursor leftright,ctrl-fβ move the cursor rightctrl-aβ move the cursor to the beginning of the linectrl-eβ move the cursor to the end of the linebackspace,ctrl-hβ delete the character before the cursordelete,ctrl-dβ delete the character under the cursorctrl-wβ delete the word before the cursorctrl-uβ delete from the cursor to the beginning of the line
π₯ EXAMPLES π₯
find -type f | zfβ fuzzy find on the file tree in the current directoryvim $(find -type f | zf)β fuzzy find on the file tree and open the selected file in vimgit switch $(git branch | cut -c 3- | zf)β switch to selected git branchfind -type f | zf --preview 'cat {}'β fuzzy find files and show a preview of the contents usingcat
π EXIT STATUS π
0β success π1β no candidates given on stdin or aborted the interactive interface with esc or ctrl-c (the "never mind" exit π)2β error π
π AUTHOR π
written by Nathan Craddock β¨
okay that's the whole page, bestie β and like any good icon she's got a version and a date: zf 0.10.3, dated 2024-10-28. go forth and fuzzy find, you're gonna slay π¦π
π
π¦ where this page comes from
- nixpkgs unstable: zf 0.10.3-unstable-2025-10-14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms