id = "less" name = "less" homepage = "https://www.greenwoodsoftware.com/less/" description = "Less is a free, open-source file pager." executables = ["less", "lesskey"] [dotfiles] # less(1), KEY BINDINGS: "If the environment variable LESSKEYIN is set, less # uses that as the name of the lesskey source file. Otherwise, less looks in a # standard place for the lesskey source file: On Unix systems, less looks for a # lesskey file called "$XDG_CONFIG_HOME/lesskey" or "$HOME/.config/lesskey" or # "$HOME/.lesskey". On MS-DOS and Windows systems, less looks for a lesskey # file called "$HOME/_lesskey"". Since less 582 the source file is read # directly and the lesskey program is no longer needed. # # "$XDG_CONFIG_HOME/lesskey" and "$HOME/.config/lesskey" are the same file # under two names — the variable and its default — which is [configHome]. The # other two are hard-coded in the home directory and stay as they are: the # Windows spelling sits in the user profile root, which resolves to the same # directory as "~", so it is written "~/_lesskey" rather than # "%USERPROFILE%/_lesskey". paths = ["~/.lesskey", "[configHome]/lesskey", "~/_lesskey"] # The search history less writes for itself (LESSHISTFILE, less(1) ENVIRONMENT # VARIABLES: "$XDG_STATE_HOME/lesshst" or "$HOME/.local/state/lesshst" or # "$XDG_DATA_HOME/lesshst" or "$HOME/.lesshst"), plus "~/.less", the compiled # binary lesskey file older versions used and current ones ignore when the # source file exists. exclude = ["~/.lesshst", "~/.local/state/lesshst", "~/.less"] # A lesskey file is key bindings and a #env section. Neither is a credential. secret = [] # Parsed at startup by a pager that then exits; rewriting it between runs is # harmless. side_effect = false # less(1) LESS ENVIRONMENT VARIABLES: the "#env" section assigns environment # variables visible only to less. LESSOPEN and LESSCLOSE name an input # preprocessor by absolute path — /usr/bin/lesspipe on Debian, a Homebrew # prefix on macOS — so the line points at a program installed on this one # machine. Every spelling is listed, because less reads whichever file it # finds first and a rule naming only one does not run for a user whose file is # one of the others. Where lesspipe lands is decided by the kind of machine # rather than by this one, so the value holds for every box of the same OS and # architecture and travels with that class. [[dotfiles.machine_lines]] file = ["~/.lesskey", "[configHome]/lesskey", "~/_lesskey"] match = { prefix = ["LESSOPEN", "LESSCLOSE"] } scope = "platform" [commands] format = 1 label = "View files with less" description = "Page through one or more files. Only common display and search options are included; prompts, colors and key files are left out." quality = "ai-draft" base = "fig:less" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/less.ts" license = "MIT" [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "line_numbers" label = "Line numbers" type = "boolean" option = ["-N", "--LINE-NUMBERS"] sources = ["fig"] [[commands.field]] id = "chop_long_lines" label = "Chop long lines" type = "boolean" option = ["-S", "--chop-long-lines"] sources = ["fig"] [[commands.field]] id = "ignore_case" label = "Ignore case in searches" type = "boolean" option = ["-i", "--ignore-case"] sources = ["fig"] [[commands.field]] id = "raw_colors" label = "Show ANSI colors" type = "boolean" option = ["-R", "--RAW-CONTROL-CHARS"] sources = ["fig"] [[commands.field]] id = "quit_if_one_screen" label = "Quit if one screen" type = "boolean" option = ["-F", "--quit-if-one-screen"] sources = ["fig"] [[commands.field]] id = "no_init" label = "Keep screen after exit" type = "boolean" option = ["-X", "--no-init"] sources = ["fig"] [[commands.field]] id = "squeeze_blank" label = "Squeeze blank lines" type = "boolean" option = ["-s", "--squeeze-blank-lines"] sources = ["fig"] [[commands.field]] id = "pattern" label = "Start at pattern" type = "string" option = ["-p", "--pattern"] sources = ["fig"] [[commands.field]] id = "mouse" label = "Mouse support" type = "boolean" option = ["--mouse"] sources = ["fig"] [[commands.task]] id = "view" label = "View files" fields = ["files", "line_numbers", "ignore_case"] required = ["files"] [[commands.task]] id = "log" label = "View with colors, no wrap" set = { raw_colors = [true], chop_long_lines = [true] } fields = ["files", "raw_colors", "chop_long_lines", "line_numbers"] required = ["files"] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "line_numbers", "chop_long_lines", "ignore_case", "raw_colors", "pattern"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["quit_if_one_screen", "no_init", "squeeze_blank", "mouse"]