mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-02-06 14:09:32 +00:00
Restructure --help output
This commit is contained in:
parent
6444cc7905
commit
88d768bf6b
968
man/man1/fzf.1
968
man/man1/fzf.1
File diff suppressed because it is too large
Load Diff
164
src/options.go
164
src/options.go
@ -24,16 +24,17 @@ with omitted characters and still get the results you want.
|
|||||||
Project URL: https://github.com/junegunn/fzf
|
Project URL: https://github.com/junegunn/fzf
|
||||||
Author: Junegunn Choi <junegunn.c@gmail.com>
|
Author: Junegunn Choi <junegunn.c@gmail.com>
|
||||||
|
|
||||||
|
* See man page for more information: fzf --man
|
||||||
|
|
||||||
Usage: fzf [options]
|
Usage: fzf [options]
|
||||||
|
|
||||||
Search
|
SEARCH
|
||||||
-x, --extended Extended-search mode
|
-e, --exact Enable exact-match
|
||||||
(enabled by default; +x or --no-extended to disable)
|
+x, --no-extended Disable extended-search mode
|
||||||
-e, --exact Enable Exact-match
|
-i, --ignore-case Case-insensitive match
|
||||||
-i, --ignore-case Case-insensitive match (default: smart-case match)
|
|
||||||
+i, --no-ignore-case Case-sensitive match
|
+i, --no-ignore-case Case-sensitive match
|
||||||
|
--smart-case Smart-case match (default)
|
||||||
--scheme=SCHEME Scoring scheme [default|path|history]
|
--scheme=SCHEME Scoring scheme [default|path|history]
|
||||||
--literal Do not normalize latin script letters before matching
|
|
||||||
-n, --nth=N[,..] Comma-separated list of field index expressions
|
-n, --nth=N[,..] Comma-separated list of field index expressions
|
||||||
for limiting search scope. Each can be a non-zero
|
for limiting search scope. Each can be a non-zero
|
||||||
integer or a range expression ([BEGIN]..[END]).
|
integer or a range expression ([BEGIN]..[END]).
|
||||||
@ -41,45 +42,40 @@ Usage: fzf [options]
|
|||||||
field index expressions
|
field index expressions
|
||||||
-d, --delimiter=STR Field delimiter regex (default: AWK-style)
|
-d, --delimiter=STR Field delimiter regex (default: AWK-style)
|
||||||
+s, --no-sort Do not sort the result
|
+s, --no-sort Do not sort the result
|
||||||
|
--literal Do not normalize latin script letters
|
||||||
--tail=NUM Maximum number of items to keep in memory
|
--tail=NUM Maximum number of items to keep in memory
|
||||||
--track Track the current selection when the result is updated
|
|
||||||
--tac Reverse the order of the input
|
|
||||||
--disabled Do not perform search
|
--disabled Do not perform search
|
||||||
--tiebreak=CRI[,..] Comma-separated list of sort criteria to apply
|
--tiebreak=CRI[,..] Comma-separated list of sort criteria to apply
|
||||||
when the scores are tied [length|chunk|begin|end|index]
|
when the scores are tied [length|chunk|begin|end|index]
|
||||||
(default: length)
|
(default: length)
|
||||||
Interface
|
|
||||||
-m, --multi[=MAX] Enable multi-select with tab/shift-tab
|
|
||||||
--no-mouse Disable mouse
|
|
||||||
--bind=KEYBINDS Custom key bindings. Refer to the man page.
|
|
||||||
--cycle Enable cyclic scroll
|
|
||||||
--wrap Enable line wrap
|
|
||||||
--wrap-sign=STR Indicator for wrapped lines
|
|
||||||
--no-multi-line Disable multi-line display of items when using --read0
|
|
||||||
--gap[=N] Render empty lines between each item
|
|
||||||
--keep-right Keep the right end of the line visible on overflow
|
|
||||||
--scroll-off=LINES Number of screen lines to keep above or below when
|
|
||||||
scrolling to the top or to the bottom (default: 0)
|
|
||||||
--no-hscroll Disable horizontal scroll
|
|
||||||
--hscroll-off=COLS Number of screen columns to keep to the right of the
|
|
||||||
highlighted substring (default: 10)
|
|
||||||
--filepath-word Make word-wise movements respect path separators
|
|
||||||
--jump-labels=CHARS Label characters for jump mode
|
|
||||||
|
|
||||||
Layout
|
INPUT/OUTPUT
|
||||||
|
--read0 Read input delimited by ASCII NUL characters
|
||||||
|
--print0 Print output delimited by ASCII NUL characters
|
||||||
|
--ansi Enable processing of ANSI color codes
|
||||||
|
--sync Synchronous search for multi-staged filtering
|
||||||
|
|
||||||
|
STYLE
|
||||||
--style=PRESET Apply a style preset [default|minimal|full]
|
--style=PRESET Apply a style preset [default|minimal|full]
|
||||||
|
--color=COLSPEC Base scheme (dark|light|16|bw) and/or custom colors
|
||||||
|
--no-color Disable colors
|
||||||
|
--no-bold Do not use bold text
|
||||||
|
|
||||||
|
LAYOUT
|
||||||
--height=[~]HEIGHT[%] Display fzf window below the cursor with the given
|
--height=[~]HEIGHT[%] Display fzf window below the cursor with the given
|
||||||
height instead of using fullscreen.
|
height instead of using fullscreen.
|
||||||
A negative value is calculated as the terminal height
|
A negative value is calculated as the terminal height
|
||||||
minus the given value.
|
minus the given value.
|
||||||
If prefixed with '~', fzf will determine the height
|
If prefixed with '~', fzf will determine the height
|
||||||
according to the input size.
|
according to the input size.
|
||||||
--min-height=HEIGHT Minimum height when --height is given in percent
|
--min-height=HEIGHT Minimum height for percent --height is given in percent
|
||||||
(default: 10)
|
(default: 10)
|
||||||
--tmux[=OPTS] Start fzf in a tmux popup (requires tmux 3.3+)
|
--tmux[=OPTS] Start fzf in a tmux popup (requires tmux 3.3+)
|
||||||
[center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]
|
[center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]
|
||||||
[,border-native] (default: center,50%)
|
[,border-native] (default: center,50%)
|
||||||
--layout=LAYOUT Choose layout: [default|reverse|reverse-list]
|
--layout=LAYOUT Choose layout: [default|reverse|reverse-list]
|
||||||
|
--margin=MARGIN Screen margin (TRBL | TB,RL | T,RL,B | T,R,B,L)
|
||||||
|
--padding=PADDING Padding inside border (TRBL | TB,RL | T,RL,B | T,R,B,L)
|
||||||
--border[=STYLE] Draw border around the finder
|
--border[=STYLE] Draw border around the finder
|
||||||
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
||||||
top|bottom|left|right|none] (default: rounded)
|
top|bottom|left|right|none] (default: rounded)
|
||||||
@ -88,6 +84,33 @@ Usage: fzf [options]
|
|||||||
[POSITIVE_INTEGER: columns from left|
|
[POSITIVE_INTEGER: columns from left|
|
||||||
NEGATIVE_INTEGER: columns from right][:bottom]
|
NEGATIVE_INTEGER: columns from right][:bottom]
|
||||||
(default: 0 or center)
|
(default: 0 or center)
|
||||||
|
|
||||||
|
LIST SECTION
|
||||||
|
-m, --multi[=MAX] Enable multi-select with tab/shift-tab
|
||||||
|
--highlight-line Highlight the whole current line
|
||||||
|
--cycle Enable cyclic scroll
|
||||||
|
--wrap Enable line wrap
|
||||||
|
--wrap-sign=STR Indicator for wrapped lines
|
||||||
|
--no-multi-line Disable multi-line display of items when using --read0
|
||||||
|
--track Track the current selection when the result is updated
|
||||||
|
--tac Reverse the order of the input
|
||||||
|
--gap[=N] Render empty lines between each item
|
||||||
|
--keep-right Keep the right end of the line visible on overflow
|
||||||
|
--scroll-off=LINES Number of screen lines to keep above or below when
|
||||||
|
scrolling to the top or to the bottom (default: 0)
|
||||||
|
--no-hscroll Disable horizontal scroll
|
||||||
|
--hscroll-off=COLS Number of screen columns to keep to the right of the
|
||||||
|
highlighted substring (default: 10)
|
||||||
|
--jump-labels=CHARS Label characters for jump mode
|
||||||
|
--pointer=STR Pointer to the current line (default: '▌' or '>')
|
||||||
|
--marker=STR Multi-select marker (default: '┃' or '>')
|
||||||
|
--marker-multi-line=STR Multi-select marker for multi-line entries;
|
||||||
|
3 elements for top, middle, and bottom (default: '╻┃╹')
|
||||||
|
--ellipsis=STR Ellipsis to show when line is truncated (default: '··')
|
||||||
|
--tabstop=SPACES Number of spaces for a tab character (default: 8)
|
||||||
|
--scrollbar[=C1[C2]] Scrollbar character(s)
|
||||||
|
(each for list section and preview window)
|
||||||
|
--no-scrollbar Hide scrollbar
|
||||||
--list-border[=STYLE] Draw border around the list section
|
--list-border[=STYLE] Draw border around the list section
|
||||||
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
||||||
top|bottom|left|right|none] (default: rounded)
|
top|bottom|left|right|none] (default: rounded)
|
||||||
@ -96,6 +119,15 @@ Usage: fzf [options]
|
|||||||
[POSITIVE_INTEGER: columns from left|
|
[POSITIVE_INTEGER: columns from left|
|
||||||
NEGATIVE_INTEGER: columns from right][:bottom]
|
NEGATIVE_INTEGER: columns from right][:bottom]
|
||||||
(default: 0 or center)
|
(default: 0 or center)
|
||||||
|
|
||||||
|
INPUT SECTION
|
||||||
|
--prompt=STR Input prompt (default: '> ')
|
||||||
|
--info=STYLE Finder info style
|
||||||
|
[default|right|hidden|inline[-right][:PREFIX]]
|
||||||
|
--info-command=COMMAND Command to generate info line
|
||||||
|
--separator=STR String to form horizontal separator on info line
|
||||||
|
--no-separator Hide info line separator
|
||||||
|
--filepath-word Make word-wise movements respect path separators
|
||||||
--input-border[=STYLE] Draw border around the input section
|
--input-border[=STYLE] Draw border around the input section
|
||||||
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
||||||
top|bottom|left|right|none] (default: rounded)
|
top|bottom|left|right|none] (default: rounded)
|
||||||
@ -104,45 +136,8 @@ Usage: fzf [options]
|
|||||||
[POSITIVE_INTEGER: columns from left|
|
[POSITIVE_INTEGER: columns from left|
|
||||||
NEGATIVE_INTEGER: columns from right][:bottom]
|
NEGATIVE_INTEGER: columns from right][:bottom]
|
||||||
(default: 0 or center)
|
(default: 0 or center)
|
||||||
--header-border[=STYLE] Draw border around the header section
|
|
||||||
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
|
||||||
top|bottom|left|right|none] (default: rounded)
|
|
||||||
--header-label=LABEL Label to print on the header border
|
|
||||||
--header-label-pos=COL Position of the header label
|
|
||||||
[POSITIVE_INTEGER: columns from left|
|
|
||||||
NEGATIVE_INTEGER: columns from right][:bottom]
|
|
||||||
(default: 0 or center)
|
|
||||||
--margin=MARGIN Screen margin (TRBL | TB,RL | T,RL,B | T,R,B,L)
|
|
||||||
--padding=PADDING Padding inside border (TRBL | TB,RL | T,RL,B | T,R,B,L)
|
|
||||||
--info=STYLE Finder info style
|
|
||||||
[default|right|hidden|inline[-right][:PREFIX]]
|
|
||||||
--info-command=COMMAND Command to generate info line
|
|
||||||
--separator=STR String to form horizontal separator on info line
|
|
||||||
--no-separator Hide info line separator
|
|
||||||
--scrollbar[=C1[C2]] Scrollbar character(s) (each for main and preview window)
|
|
||||||
--no-scrollbar Hide scrollbar
|
|
||||||
--prompt=STR Input prompt (default: '> ')
|
|
||||||
--pointer=STR Pointer to the current line (default: '▌' or '>')
|
|
||||||
--marker=STR Multi-select marker (default: '┃' or '>')
|
|
||||||
--marker-multi-line=STR Multi-select marker for multi-line entries;
|
|
||||||
3 elements for top, middle, and bottom (default: '╻┃╹')
|
|
||||||
--header=STR String to print as header
|
|
||||||
--header-lines=N The first N lines of the input are treated as header
|
|
||||||
--header-first Print header before the prompt line
|
|
||||||
--ellipsis=STR Ellipsis to show when line is truncated (default: '··')
|
|
||||||
|
|
||||||
Display
|
PREVIEW WINDOW
|
||||||
--ansi Enable processing of ANSI color codes
|
|
||||||
--tabstop=SPACES Number of spaces for a tab character (default: 8)
|
|
||||||
--color=COLSPEC Base scheme (dark|light|16|bw) and/or custom colors
|
|
||||||
--highlight-line Highlight the whole current line
|
|
||||||
--no-bold Do not use bold text
|
|
||||||
|
|
||||||
History
|
|
||||||
--history=FILE History file
|
|
||||||
--history-size=N Maximum number of history entries (default: 1000)
|
|
||||||
|
|
||||||
Preview
|
|
||||||
--preview=COMMAND Command to preview highlighted line ({})
|
--preview=COMMAND Command to preview highlighted line ({})
|
||||||
--preview-window=OPT Preview window layout (default: right:50%)
|
--preview-window=OPT Preview window layout (default: right:50%)
|
||||||
[up|down|left|right][,SIZE[%]]
|
[up|down|left|right][,SIZE[%]]
|
||||||
@ -157,37 +152,56 @@ Usage: fzf [options]
|
|||||||
--preview-label-pos=N Same as --border-label and --border-label-pos,
|
--preview-label-pos=N Same as --border-label and --border-label-pos,
|
||||||
but for preview window
|
but for preview window
|
||||||
|
|
||||||
Scripting
|
HEADER
|
||||||
|
--header=STR String to print as header
|
||||||
|
--header-lines=N The first N lines of the input are treated as header
|
||||||
|
--header-first Print header before the prompt line
|
||||||
|
--header-border[=STYLE] Draw border around the header section
|
||||||
|
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
|
||||||
|
top|bottom|left|right|none] (default: rounded)
|
||||||
|
--header-label=LABEL Label to print on the header border
|
||||||
|
--header-label-pos=COL Position of the header label
|
||||||
|
[POSITIVE_INTEGER: columns from left|
|
||||||
|
NEGATIVE_INTEGER: columns from right][:bottom]
|
||||||
|
(default: 0 or center)
|
||||||
|
|
||||||
|
SCRIPTING
|
||||||
-q, --query=STR Start the finder with the given query
|
-q, --query=STR Start the finder with the given query
|
||||||
-1, --select-1 Automatically select the only match
|
-1, --select-1 Automatically select the only match
|
||||||
-0, --exit-0 Exit immediately when there's no match
|
-0, --exit-0 Exit immediately when there's no match
|
||||||
-f, --filter=STR Filter mode. Do not start interactive finder.
|
-f, --filter=STR Print matches for the initial query and exit
|
||||||
--print-query Print query as the first line
|
--print-query Print query as the first line
|
||||||
--expect=KEYS Comma-separated list of keys to complete fzf
|
--expect=KEYS Comma-separated list of keys to complete fzf
|
||||||
--read0 Read input delimited by ASCII NUL characters
|
|
||||||
--print0 Print output delimited by ASCII NUL characters
|
KEY/EVENT BINDING
|
||||||
--sync Synchronous search for multi-staged filtering
|
--bind=BINDINGS Custom key/event bindings
|
||||||
|
|
||||||
|
ADVANCED
|
||||||
--with-shell=STR Shell command and flags to start child processes with
|
--with-shell=STR Shell command and flags to start child processes with
|
||||||
--listen[=[ADDR:]PORT] Start HTTP server to receive actions (POST /)
|
--listen[=[ADDR:]PORT] Start HTTP server to receive actions (POST /)
|
||||||
(To allow remote process execution, use --listen-unsafe)
|
(To allow remote process execution, use --listen-unsafe)
|
||||||
|
|
||||||
Directory traversal (Only used when $FZF_DEFAULT_COMMAND is not set)
|
DIRECTORY TRAVERSAL (Only used when $FZF_DEFAULT_COMMAND is not set)
|
||||||
--walker=OPTS [file][,dir][,follow][,hidden] (default: file,follow,hidden)
|
--walker=OPTS [file][,dir][,follow][,hidden] (default: file,follow,hidden)
|
||||||
--walker-root=DIR [...] List of directories to walk (default: .)
|
--walker-root=DIR [...] List of directories to walk (default: .)
|
||||||
--walker-skip=DIRS Comma-separated list of directory names to skip
|
--walker-skip=DIRS Comma-separated list of directory names to skip
|
||||||
(default: .git,node_modules)
|
(default: .git,node_modules)
|
||||||
|
|
||||||
Shell integration
|
HISTORY
|
||||||
|
--history=FILE History file
|
||||||
|
--history-size=N Maximum number of history entries (default: 1000)
|
||||||
|
|
||||||
|
SHELL INTEGRATION
|
||||||
--bash Print script to set up Bash shell integration
|
--bash Print script to set up Bash shell integration
|
||||||
--zsh Print script to set up Zsh shell integration
|
--zsh Print script to set up Zsh shell integration
|
||||||
--fish Print script to set up Fish shell integration
|
--fish Print script to set up Fish shell integration
|
||||||
|
|
||||||
Help
|
HELP
|
||||||
--version Display version information and exit
|
--version Display version information and exit
|
||||||
--help Show this message
|
--help Show this message
|
||||||
--man Show man page
|
--man Show man page
|
||||||
|
|
||||||
Environment variables
|
ENVIRONMENT VARIABLES
|
||||||
FZF_DEFAULT_COMMAND Default command to use when input is tty
|
FZF_DEFAULT_COMMAND Default command to use when input is tty
|
||||||
FZF_DEFAULT_OPTS Default options (e.g. '--layout=reverse --info=inline')
|
FZF_DEFAULT_OPTS Default options (e.g. '--layout=reverse --info=inline')
|
||||||
FZF_DEFAULT_OPTS_FILE Location of the file to read default options from
|
FZF_DEFAULT_OPTS_FILE Location of the file to read default options from
|
||||||
@ -2279,6 +2293,8 @@ func parseOptions(index *int, opts *Options, allArgs []string) error {
|
|||||||
}
|
}
|
||||||
case "--no-tail":
|
case "--no-tail":
|
||||||
opts.Tail = 0
|
opts.Tail = 0
|
||||||
|
case "--smart-case":
|
||||||
|
opts.Case = CaseSmart
|
||||||
case "-i", "--ignore-case":
|
case "-i", "--ignore-case":
|
||||||
opts.Case = CaseIgnore
|
opts.Case = CaseIgnore
|
||||||
case "+i", "--no-ignore-case":
|
case "+i", "--no-ignore-case":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user