LinuxCommandLibrary

skim

Fuzzy find items in lists for selection

SYNOPSIS

skim [options] [path ...]
command | skim [options]

PARAMETERS

-i, --case-sensitive
    Performs a case-sensitive search, overriding the default behavior which is usually case-insensitive unless the query contains uppercase letters.

-q, --query STRING
    Specifies an initial query string that will be pre-filled in the search prompt when skim starts.

-p, --preview COMMAND
    Sets a command to execute for previewing the currently selected item. The selected item's content is passed as an argument to COMMAND.

-m, --multi
    Enables multi-selection mode, allowing the user to select multiple items before pressing Enter. Selected items are highlighted.

--bind KEYBINDS
    Binds custom actions to specific key presses. This allows for highly customized interactive behavior within skim.

--ansi
    Instructs skim to interpret ANSI color codes in the input, rendering colored output within the selection list.

--height HEIGHT
    Sets the height of skim's interface. Can be a percentage (e.g., '50%') or a number of lines (e.g., '20').

-0, --print0
    Prints the selected items separated by a null character (ASCII NUL) instead of a newline. Useful for piping to xargs -0.

DESCRIPTION


The skim command, often invoked as sk, is a powerful and highly customizable fuzzy finder written in Rust. It's designed to interactively filter lines from standard input or files, allowing users to quickly search, select, and process information. Typically, skim is used in combination with other commands by piping their output to skim, or by feeding it a list of files. It excels at tasks like finding files, navigating command history, selecting Git commits, or filtering through large lists of data. Its key features include speed, flexible matching algorithms (fuzzy, exact, regex), a configurable preview window for selected items, and support for custom actions triggered by keybindings. skim aims to provide a fast, efficient, and highly interactive user experience for navigating and sifting through textual information in the terminal.

CAVEATS


skim requires a modern terminal emulator that supports ANSI escape codes for full functionality, including colors and interactive display. Configuring advanced features like custom key bindings and preview commands can be complex and may require some familiarity with shell scripting. For very large inputs (millions of lines), while generally fast, performance can still be a consideration.

INTEGRATION WITH SHELLS


skim provides scripts for shell integration (e.g., Bash, Zsh, Fish) that enable features like fuzzy-finding through command history (via `CTRL-R`), fuzzy-completion for files and directories, and more. These integrations significantly enhance command-line productivity by making skim a seamless part of the shell experience.

HISTORY


skim emerged as a high-performance fuzzy finder, written from scratch in Rust, a language known for its safety and speed. It was developed to offer an alternative to existing fuzzy finders like fzf, with a strong focus on customizability and a small memory footprint. Its development has been community-driven, gaining traction among users seeking a highly optimized and flexible tool for interactive data selection in the command line environment.

SEE ALSO

fzf(1), peco(1), dmenu(1), rofi(1)

Copied to clipboard