@@ -15,66 +15,164 @@ var rootCmd = &cobra.Command{
1515func Execute () error {
1616 return rootCmd .Execute ()
1717}
18+
1819func init () {
1920 carapace .Gen (rootCmd ).Standalone ()
2021
22+ rootCmd .Flags ().String ("accept-nth" , "" , "Define which fields to print on accept" )
2123 rootCmd .Flags ().String ("algo" , "" , "Fuzzy matching algorithm" )
2224 rootCmd .Flags ().Bool ("ansi" , false , "Enable processing of ANSI color codes" )
25+ rootCmd .Flags ().Bool ("bash" , false , "Print script to set up Bash shell integration" )
2326 rootCmd .Flags ().String ("bind" , "" , "Custom key bindings" )
2427 rootCmd .Flags ().String ("border" , "" , "Draw border around the finder" )
28+ rootCmd .Flags ().String ("border-label" , "" , "Label to print on the border" )
29+ rootCmd .Flags ().String ("border-label-pos" , "" , "Position of the border label" )
2530 rootCmd .Flags ().String ("color" , "" , "Base scheme" )
2631 rootCmd .Flags ().Bool ("cycle" , false , "Enable cyclic scroll" )
2732 rootCmd .Flags ().StringP ("delimiter" , "d" , "" , "Field delimiter regex" )
33+ rootCmd .Flags ().Bool ("disabled" , false , "Do not perform search" )
34+ rootCmd .Flags ().String ("ellipsis" , "" , "Ellipsis to show when line is truncated" )
2835 rootCmd .Flags ().BoolP ("exact" , "e" , false , "Enable Exact-match" )
2936 rootCmd .Flags ().BoolP ("exit-0" , "0" , false , "Exit immediately when there's no match" )
3037 rootCmd .Flags ().String ("expect" , "" , "Comma-separated list of keys to complete fzf" )
3138 rootCmd .Flags ().BoolP ("extended" , "x" , false , "Extended-search mode" )
3239 rootCmd .Flags ().Bool ("filepath-word" , false , "Make word-wise movements respect path separators" )
3340 rootCmd .Flags ().StringP ("filter" , "f" , "" , "Filter mode" )
41+ rootCmd .Flags ().Bool ("fish" , false , "Print script to set up Fish shell integration" )
42+ rootCmd .Flags ().String ("footer" , "" , "String to print as footer" )
43+ rootCmd .Flags ().String ("footer-border" , "" , "Draw border around the footer section" )
44+ rootCmd .Flags ().String ("footer-label" , "" , "Label to print on the footer border" )
45+ rootCmd .Flags ().String ("footer-label-pos" , "" , "Position of the footer label" )
46+ rootCmd .Flags ().String ("freeze-left" , "" , "Number of fields to freeze on the left" )
47+ rootCmd .Flags ().String ("freeze-right" , "" , "Number of fields to freeze on the right" )
48+ rootCmd .Flags ().String ("gap" , "" , "Render empty lines between each item" )
49+ rootCmd .Flags ().String ("gap-line" , "" , "Draw horizontal line on each gap using the string" )
50+ rootCmd .Flags ().String ("ghost" , "" , "Ghost text to display when the input is empty" )
51+ rootCmd .Flags ().String ("gutter" , "" , "Character used for the gutter column" )
52+ rootCmd .Flags ().String ("gutter-raw" , "" , "Character used for the gutter column in raw mode" )
3453 rootCmd .Flags ().String ("header" , "" , "String to print as header" )
54+ rootCmd .Flags ().String ("header-border" , "" , "Draw border around the header section" )
55+ rootCmd .Flags ().Bool ("header-first" , false , "Print header before the prompt line" )
56+ rootCmd .Flags ().String ("header-label-pos" , "" , "Position of the header label" )
3557 rootCmd .Flags ().String ("header-lines" , "" , "The first N lines of the input are treated as header" )
36- rootCmd .Flags ().String ("height" , "" , "Display fzf window below the cursor with the given height" )
37- rootCmd .Flags ().String ("history" , "" , "History file" )
58+ rootCmd .Flags ().String ("header-lines-border" , "" , "Display header from --header-lines with a separate border" )
59+ rootCmd .Flags ().String ("height" , "" , "Display fzf window below the cursor with the given height instead of using fullscreen" )
60+ rootCmd .Flags ().Bool ("help" , false , "Show this message" )
61+ rootCmd .Flags ().Bool ("highlight-line" , false , "Highlight the whole current line" )
62+ rootCmd .Flags ().String ("history" , "" , "File to store fzf search history (*not* shell command history)" )
3863 rootCmd .Flags ().String ("history-size" , "" , "Maximum number of history entries" )
3964 rootCmd .Flags ().String ("hscroll-off" , "" , "Number of screen columns to keep to the right" )
40- rootCmd .Flags ().BoolS ("i" , "i" , false , "Case-insensitive match" )
41- rootCmd .Flags ().String ("info" , "" , "Finder info style [default|inline|hidden]" )
65+ rootCmd .Flags ().BoolP ("ignore-case" , "i" , false , "Case-insensitive match" )
66+ rootCmd .Flags ().String ("info" , "" , "Finder info style" )
67+ rootCmd .Flags ().String ("info-command" , "" , "Command to generate info line" )
68+ rootCmd .Flags ().String ("input-border" , "" , "Draw border around the input section" )
69+ rootCmd .Flags ().String ("input-label" , "" , "Label to print on the input border" )
70+ rootCmd .Flags ().String ("input-label-pos" , "" , "Position of the input label" )
4271 rootCmd .Flags ().String ("jump-labels" , "" , "Label characters for jump and jump-accept" )
4372 rootCmd .Flags ().Bool ("keep-right" , false , "Keep the right end of the line visible on overflow" )
4473 rootCmd .Flags ().String ("layout" , "" , "Choose layout" )
74+ rootCmd .Flags ().String ("list-border" , "" , "Draw border around the list section" )
75+ rootCmd .Flags ().String ("list-label" , "" , "Label to print on the list border" )
76+ rootCmd .Flags ().String ("list-label-pos" , "" , "Position of the list label" )
77+ rootCmd .Flags ().String ("listen" , "" , "Start HTTP server to receive actions via TCP/Unix domain socket" )
78+ rootCmd .Flags ().String ("listen-unsafe" , "" , "allow remote process execution" )
4579 rootCmd .Flags ().Bool ("literal" , false , "Do not normalize latin script letters before matching" )
80+ rootCmd .Flags ().Bool ("man" , false , "Show man page" )
4681 rootCmd .Flags ().String ("margin" , "" , "Screen margin" )
4782 rootCmd .Flags ().String ("marker" , "" , "Multi-select marker" )
48- rootCmd .Flags ().String ("min-height" , "" , "Minimum height when --height is given in percent" )
83+ rootCmd .Flags ().String ("marker-multi-line" , "" , "Multi-select marker for multi-line entries" )
84+ rootCmd .Flags ().String ("min-height" , "" , "Minimum height when --height is given as a percentage" )
4985 rootCmd .Flags ().StringP ("multi" , "m" , "" , "Enable multi-select with tab/shift-tab" )
5086 rootCmd .Flags ().Bool ("no-bold" , false , "Do not use bold text" )
87+ rootCmd .Flags ().Bool ("no-clear" , false , "Do not clear finder interface on exit" )
88+ rootCmd .Flags ().Bool ("no-color" , false , "Disable colors" )
89+ rootCmd .Flags ().Bool ("no-extended" , false , "Disable extended-search mode" )
5190 rootCmd .Flags ().Bool ("no-hscroll" , false , "Disable horizontal scroll" )
91+ rootCmd .Flags ().Bool ("no-ignore-case" , false , "Case-sensitive match" )
92+ rootCmd .Flags ().Bool ("no-info" , false , "A synonym for --info=hidden" )
93+ rootCmd .Flags ().Bool ("no-input" , false , "Disable and hide the input section" )
5294 rootCmd .Flags ().Bool ("no-mouse" , false , "Disable mouse" )
53- rootCmd .Flags ().StringP ("nth" , "n" , "" , "Comma-separated list of field index expressions" )
95+ rootCmd .Flags ().Bool ("no-multi" , false , "Disable multi-select" )
96+ rootCmd .Flags ().Bool ("no-multi-line" , false , "Disable multi-line display of items when using --read0" )
97+ rootCmd .Flags ().Bool ("no-scrollbar" , false , "Hide scrollbar" )
98+ rootCmd .Flags ().Bool ("no-separator" , false , "Hide info line separator" )
99+ rootCmd .Flags ().Bool ("no-sort" , false , "Do not sort the result" )
100+ rootCmd .Flags ().Bool ("no-tty-default" , false , "Make fzf search for the current TTY device via standard error instead of defaulting to /dev/tty" )
101+ rootCmd .Flags ().Bool ("no-unicode" , false , "Use ASCII characters instead of Unicode drawing characters to draw borders, the spinner and the horizontal separator" )
102+ rootCmd .Flags ().StringP ("nth" , "n" , "" , "Comma-separated list of field index expressions for limiting search scope" )
54103 rootCmd .Flags ().String ("padding" , "" , "Padding inside border" )
55104 rootCmd .Flags ().Bool ("phony" , false , "Do not perform search" )
56105 rootCmd .Flags ().String ("pointer" , "" , "Pointer to the current line" )
57106 rootCmd .Flags ().String ("preview" , "" , "Command to preview highlighted line" )
107+ rootCmd .Flags ().String ("preview-border" , "" , "Short for --preview-window=border-STYLE" )
108+ rootCmd .Flags ().String ("preview-label" , "" , "Label to print on the horizontal border line of the preview window" )
109+ rootCmd .Flags ().String ("preview-label-pos" , "" , "Position of the border label on the border line of the preview window" )
58110 rootCmd .Flags ().String ("preview-window" , "" , "Preview window layout" )
111+ rootCmd .Flags ().String ("preview-wrap-sign" , "" , "Indicator for wrapped lines in the preview window" )
59112 rootCmd .Flags ().Bool ("print-query" , false , "Print query as the first line" )
60113 rootCmd .Flags ().Bool ("print0" , false , "Print output delimited by ASCII NUL characters" )
61114 rootCmd .Flags ().String ("prompt" , "" , "Input prompt" )
62115 rootCmd .Flags ().StringP ("query" , "q" , "" , "Start the finder with the given query" )
116+ rootCmd .Flags ().Bool ("raw" , false , "Enable raw mode (show non-matching items)" )
63117 rootCmd .Flags ().Bool ("read0" , false , "Read input delimited by ASCII NUL characters" )
118+ rootCmd .Flags ().String ("scheme" , "" , "Scoring scheme" )
119+ rootCmd .Flags ().String ("scroll-off" , "" , "Number of screen lines to keep above or below when scrolling to the top or to the bottom" )
120+ rootCmd .Flags ().String ("scrollbar" , "" , "Scrollbar character(s) (each for list section and preview window)" )
64121 rootCmd .Flags ().BoolP ("select-1" , "1" , false , "Automatically select the only match" )
122+ rootCmd .Flags ().String ("separator" , "" , "Draw horizontal separator on info line using the string" )
123+ rootCmd .Flags ().Bool ("smart-case" , false , "Smart-case match" )
124+ rootCmd .Flags ().String ("style" , "" , "Apply a style preset" )
65125 rootCmd .Flags ().Bool ("sync" , false , "Synchronous search for multi-staged filtering" )
66126 rootCmd .Flags ().String ("tabstop" , "" , "Number of spaces for a tab character" )
67127 rootCmd .Flags ().Bool ("tac" , false , "Reverse the order of the input" )
128+ rootCmd .Flags ().String ("tail" , "" , "Maximum number of items to keep in memory" )
68129 rootCmd .Flags ().String ("tiebreak" , "" , "Comma-separated list of sort criteria to apply" )
130+ rootCmd .Flags ().String ("tmux" , "" , "Start fzf in a tmux popup" )
131+ rootCmd .Flags ().Bool ("track" , false , "Track the current selection when the result is updated" )
69132 rootCmd .Flags ().Bool ("version" , false , "Display version information and exit" )
133+ rootCmd .Flags ().String ("walker" , "" , "Determines the behavior of the built-in directory walker" )
134+ rootCmd .Flags ().String ("walker-root" , "" , "List of directories to walk" )
135+ rootCmd .Flags ().String ("walker-skip" , "" , "Comma-separated list of directory names to skip" )
70136 rootCmd .Flags ().String ("with-nth" , "" , "Transform the presentation of each line using field index expressions" )
137+ rootCmd .Flags ().String ("with-shell" , "" , "Shell command and flags to start child processes with" )
138+ rootCmd .Flags ().String ("wrap" , "" , "Enable line wrap" )
139+ rootCmd .Flags ().String ("wrap-sign" , "" , "Indicator for wrapped lines" )
140+ rootCmd .Flags ().Bool ("zsh" , false , "Print script to set up Zsh shell integration" )
141+
142+ rootCmd .Flag ("border" ).NoOptDefVal = ""
143+ rootCmd .Flag ("footer-border" ).NoOptDefVal = ""
144+ rootCmd .Flag ("gap" ).NoOptDefVal = ""
145+ rootCmd .Flag ("gap-line" ).NoOptDefVal = ""
146+ rootCmd .Flag ("header-border" ).NoOptDefVal = ""
147+ rootCmd .Flag ("header-lines-border" ).NoOptDefVal = ""
148+ rootCmd .Flag ("input-border" ).NoOptDefVal = ""
149+ rootCmd .Flag ("list-border" ).NoOptDefVal = ""
150+ rootCmd .Flag ("listen" ).NoOptDefVal = ""
151+ rootCmd .Flag ("multi" ).NoOptDefVal = ""
152+ rootCmd .Flag ("preview-border" ).NoOptDefVal = ""
153+ rootCmd .Flag ("scrollbar" ).NoOptDefVal = ""
154+ rootCmd .Flag ("tmux" ).NoOptDefVal = ""
155+ rootCmd .Flag ("wrap" ).NoOptDefVal = ""
156+
157+ borderStyles := []string {"rounded" , "sharp" , "bold" , "block" , "thinblock" , "double" , "horizontal" , "vertical" , "top" , "bottom" , "left" , "right" , "line" , "none" }
71158
72159 carapace .Gen (rootCmd ).FlagCompletion (carapace.ActionMap {
73- "algo" : carapace .ActionValues ("v1" , "v2" ),
74- "border" : carapace .ActionValues ("rounded" , "sharp" , "horizontal" , "vertical" , "top" , "bottom" , "left" , "right" ),
75- "color" : carapace .ActionValues ("dark" , "light" , "16" , "bw" ),
76- "info" : carapace .ActionValues ("default" , "inline" , "hidden" ),
77- "layout" : carapace .ActionValues ("default" , "reverse" , "reverse-list" ),
78- "tiebreak" : carapace .ActionValues ("length" , "begin" , "end" , "index" ).UniqueList ("," ),
160+ "algo" : carapace .ActionValues ("v1" , "v2" ),
161+ "border" : carapace .ActionValues (borderStyles ... ),
162+ "color" : carapace .ActionValues ("dark" , "light" , "16" , "bw" ),
163+ "footer-border" : carapace .ActionValues (borderStyles ... ),
164+ "header-border" : carapace .ActionValues (borderStyles ... ),
165+ "header-lines-border" : carapace .ActionValues (borderStyles ... ),
166+ "history" : carapace .ActionFiles (),
167+ "info" : carapace .ActionValues ("default" , "right" , "hidden" , "inline" , "inline-right" ),
168+ "input-border" : carapace .ActionValues (borderStyles ... ),
169+ "layout" : carapace .ActionValues ("default" , "reverse" , "reverse-list" ),
170+ "list-border" : carapace .ActionValues (borderStyles ... ),
171+ "preview-border" : carapace .ActionValues (borderStyles ... ),
172+ "scheme" : carapace .ActionValues ("default" , "path" , "history" ),
173+ "tiebreak" : carapace .ActionValues ("length" , "chunk" , "pathname" , "begin" , "end" , "index" ).UniqueList ("," ),
174+ "walker" : carapace .ActionValues ("file" , "dir" , "follow" , "hidden" ).UniqueList ("," ),
175+ "walker-skip" : carapace .ActionDirectories ().UniqueList ("," ),
176+ "wrap" : carapace .ActionValues ("char" , "word" ),
79177 })
80178}
0 commit comments