ZF(1)

πŸ“¦ version 0.10.3-unstable-2025-10, in nixpkgs unstable

πŸ’… 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 (default 10)
  • -k, --keep-order β€” don't sort by rank and preserve order of lines read on stdin. this makes zf remove 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 version 1.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 (default 60%)
  • -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 example export 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, white bright_black, bright_red, bright_green, bright_yellow, bright_blue, bright_magenta, bright_cyan, and bright_white. the default color is cyan. the bright ones are literally so extra, obsessed πŸ’œ
  • ZF_VI_MODE β€” when this variable is present and not empty ctrl+k moves up a line. when disabled ctrl+k deletes from the cursor to the end of line. two completely different personalities depending on one env var, iykyk πŸ‘€
  • NO_COLOR β€” disables colors. see https://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 exit
  • escape, ctrl-c β€” exit zf without selecting anything (the dramatic exit, no commitment πŸ’€)
  • up, ctrl-p, ctrl-k β€” select the next line up
  • down ctrl-n, ctrl-j β€” select the next line down
  • tab β€” mark the current line as selected and select the next line
  • shift-tab β€” mark the current line as selected and select the previous line
  • left, ctrl-b β€” move the cursor left
  • right, ctrl-f β€” move the cursor right
  • ctrl-a β€” move the cursor to the beginning of the line
  • ctrl-e β€” move the cursor to the end of the line
  • backspace, ctrl-h β€” delete the character before the cursor
  • delete, ctrl-d β€” delete the character under the cursor
  • ctrl-w β€” delete the word before the cursor
  • ctrl-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 directory
  • vim $(find -type f | zf) β€” fuzzy find on the file tree and open the selected file in vim
  • git switch $(git branch | cut -c 3- | zf) β€” switch to selected git branch
  • find -type f | zf --preview 'cat {}' β€” fuzzy find files and show a preview of the contents using cat

πŸ‘‘ 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