0.13.0
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Junegunn Choi · committed by Junegunn Choi · parent 2bbc120 · Browse files · 4 files·+227 added−194 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+227 added−194 removed
- other:+227 added−194 removed
Provenance
- Commit
3e1d6a7- Tree
6f1cf2f- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
2bbc120
4 files changed+227 added−194 removed
modified:man/man1/fzf.1+217 added-188 removed
19 unmodified lines20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN22 THE SOFTWARE.23 ..24-.TH fzf 1 "May 2016" "fzf 0.12.2" "fzf - a command-line fuzzy finder"24+.TH fzf 1 "Jun 2016" "fzf 0.13.0" "fzf - a command-line fuzzy finder"25 26 .SH NAME27 fzf - a command-line fuzzy finder28 20 unmodified lines49 Case-sensitive match50 .TP51 .BI "-n, --nth=" "N[,..]"52 Comma-separated list of field index expressions for limiting search scope.53-See \fBFIELD INDEX EXPRESSION\fR for details.53+See \fBFIELD INDEX EXPRESSION\fR for the details.54 .TP55 .BI "--with-nth=" "N[,..]"56-Transform each item using index expressions within finder56+Transform the presentation of each line using field index expressions57 .TP58 .BI "-d, --delimiter=" "STR"59 Field delimiter regex for \fB--nth\fR and \fB--with-nth\fR (default: AWK-style)60 .SS Search result2 unmodified lines63 Do not sort the result64 .TP65 .B "--tac"66 Reverse the order of the input67+68 .RS69 e.g. \fBhistory | fzf --tac --no-sort\fR70 .RE71 .TP1 unmodified line73 Comma-separated list of sort criteria to apply when the scores are tied.74 .br75 76 .br76-.BR length " Prefers item with shorter length"77+.BR length " Prefers line with shorter length"78 .br78-.BR begin " Prefers item with matched substring closer to the beginning"79+.BR begin " Prefers line with matched substring closer to the beginning"80 .br80-.BR end " Prefers item with matched substring closer to the end"81+.BR end " Prefers line with matched substring closer to the end"82 .br82-.BR index " Prefers item that appeared earlier in the input stream"83+.BR index " Prefers line that appeared earlier in the input stream"84 .br85 86 .br87 - Each criterion should appear only once in the list2 unmodified lines90 .br91 - \fBindex\fR is implicitly appended to the list when not specified92 .br93 - Default is \fBlength\fR (or equivalently \fBlength\fR,index)94+.br95+- If \fBend\fR is found in the list, fzf will scan each line backwards96 .SS Interface97 .TP98 .B "-m, --multi"99 Enable multi-select with tab/shift-tab100 .TP98-.B "--ansi"99-Enable processing of ANSI color codes100-.TP101 .B "--no-mouse"102 Disable mouse103 .TP104-.BI "--color=" "[BASE_SCHEME][,COLOR:ANSI]"105-Color configuration. The name of the base color scheme is followed by custom106-color mappings. Ansi color code of -1 denotes terminal default107-foreground/background color.108-109-.RS110-e.g. \fBfzf --color=bg+:24\fR111- \fBfzf --color=light,fg:232,bg:255,bg+:116,info:27\fR112-.RE113-114-.RS115-.B BASE SCHEME:116- (default: dark on 256-color terminal, otherwise 16)117-118- \fBdark \fRColor scheme for dark 256-color terminal119- \fBlight \fRColor scheme for light 256-color terminal120- \fB16 \fRColor scheme for 16-color terminal121- \fBbw \fRNo colors122-123-.B COLOR:124- \fBfg \fRText125- \fBbg \fRBackground126- \fBhl \fRHighlighted substrings127- \fBfg+ \fRText (current line)128- \fBbg+ \fRBackground (current line)129- \fBhl+ \fRHighlighted substrings (current line)130- \fBinfo \fRInfo131- \fBprompt \fRPrompt132- \fBpointer \fRPointer to the current line133- \fBmarker \fRMulti-select marker134- \fBspinner \fRStreaming input indicator135- \fBheader \fRHeader136-.RE104+.BI "--bind=" "KEYBINDS"105+Comma-separated list of custom key bindings. See \fBKEY BINDINGS\fR for the106+details.107 .TP138-.B "--black"139-Use black background108+.B "--cycle"109+Enable cyclic scroll110 .TP111+.B "--no-hscroll"112+Disable horizontal scroll113+.TP114+.BI "--hscroll-off=" "COL"115+Number of screen columns to keep to the right of the highlighted substring116+(default: 10). Setting it to a large value will cause the text to be positioned117+on the center of the screen.118+.TP119+.BI "--jump-labels=" "CHARS"120+Label characters for \fBjump\fR and \fBjump-accept\fR121+.SS Layout122+.TP123 .B "--reverse"124 Reverse orientation125 .TP126 .BI "--margin=" MARGIN20 unmodified lines147 e.g. \fBfzf --margin 10%\fR148 \fBfzf --margin 1,5%\fR149 .RE150 .TP169-.BI "--tabstop=" SPACES170-Number of spaces for a tab character (default: 8)171-.TP172-.B "--cycle"173-Enable cyclic scroll174-.TP175-.B "--no-hscroll"176-Disable horizontal scroll177-.TP178-.BI "--hscroll-off=" "COL"179-Number of screen columns to keep to the right of the highlighted substring180-(default: 10). Setting it to a large value will cause the text to be positioned181-on the center of the screen.182-.TP151 .B "--inline-info"152 Display finder info inline with the query153 .TP186-.BI "--jump-labels=" "CHARS"187-Label characters for \fBjump\fR and \fBjump-accept\fR188-.TP154 .BI "--prompt=" "STR"155 Input prompt (default: '> ')156 .TP192-.BI "--toggle-sort=" "KEY"193-Key to toggle sort. For the list of the allowed key names, see \fB--bind\fR.157+.BI "--header=" "STR"158+The given string will be printed as the sticky header. The lines are displayed159+in the given order from top to bottom regardless of \fB--reverse\fR option, and160+are not affected by \fB--with-nth\fR. ANSI color codes are processed even when161+\fB--ansi\fR is not set.162 .TP195-.BI "--bind=" "KEYBINDS"196-Comma-separated list of custom key bindings. Each key binding expression197-follows the following format: \fBKEY:ACTION\fR198-.RS199-e.g. \fBfzf --bind=ctrl-j:accept,ctrl-k:kill-line\fR200-.RE163+.BI "--header-lines=" "N"164+The first N lines of the input are treated as the sticky header. When165+\fB--with-nth\fR is set, the lines are transformed just like the other166+lines that follow.167+.SS Display168+.TP169+.B "--ansi"170+Enable processing of ANSI color codes171+.TP172+.BI "--tabstop=" SPACES173+Number of spaces for a tab character (default: 8)174+.TP175+.BI "--color=" "[BASE_SCHEME][,COLOR:ANSI]"176+Color configuration. The name of the base color scheme is followed by custom177+color mappings. Ansi color code of -1 denotes terminal default178+foreground/background color.179 180 .RS203-.B AVAILABLE KEYS: (SYNONYMS)204- \fIctrl-[a-z]\fR205- \fIalt-[a-z]\fR206- \fIf[1-10]\fR207- \fIenter\fR (\fIreturn\fR \fIctrl-m\fR)208- \fIspace\fR209- \fIbspace\fR (\fIbs\fR)210- \fIalt-enter\fR211- \fIalt-space\fR212- \fIalt-bspace\fR (\fIalt-bs\fR)213- \fIalt-/\fR214- \fItab\fR215- \fIbtab\fR (\fIshift-tab\fR)216- \fIesc\fR217- \fIdel\fR218- \fIup\fR219- \fIdown\fR220- \fIleft\fR221- \fIright\fR222- \fIhome\fR223- \fIend\fR224- \fIpgup\fR (\fIpage-up\fR)225- \fIpgdn\fR (\fIpage-down\fR)226- \fIshift-left\fR227- \fIshift-right\fR228- \fIdouble-click\fR229- or any single character181+e.g. \fBfzf --color=bg+:24\fR182+ \fBfzf --color=light,fg:232,bg:255,bg+:116,info:27\fR183 .RE184 185 .RS233- \fBACTION: DEFAULT BINDINGS (NOTES):234- \fBabort\fR \fIctrl-c ctrl-g ctrl-q esc\fR235- \fBaccept\fR \fIenter double-click\fR236- \fBbackward-char\fR \fIctrl-b left\fR237- \fBbackward-delete-char\fR \fIctrl-h bspace\fR238- \fBbackward-kill-word\fR \fIalt-bs\fR239- \fBbackward-word\fR \fIalt-b shift-left\fR240- \fBbeginning-of-line\fR \fIctrl-a home\fR241- \fBcancel\fR242- \fBclear-screen\fR \fIctrl-l\fR243- \fBdelete-char\fR \fIdel\fR244- \fBdelete-char/eof\fR \fIctrl-d\fR245- \fBdeselect-all\fR246- \fBdown\fR \fIctrl-j ctrl-n down\fR247- \fBend-of-line\fR \fIctrl-e end\fR248- \fBexecute(...)\fR (see below for the details)249- \fBexecute-multi(...)\fR (see below for the details)250- \fBforward-char\fR \fIctrl-f right\fR251- \fBforward-word\fR \fIalt-f shift-right\fR252- \fBignore\fR253- \fBjump\fR (EasyMotion-like 2-keystroke movement)254- \fBjump-accept\fR (jump and accept)255- \fBkill-line\fR256- \fBkill-word\fR \fIalt-d\fR257- \fBnext-history\fR (\fIctrl-n\fR on \fB--history\fR)258- \fBpage-down\fR \fIpgdn\fR259- \fBpage-up\fR \fIpgup\fR260- \fBprevious-history\fR (\fIctrl-p\fR on \fB--history\fR)261- \fBprint-query\fR (print query and exit)262- \fBselect-all\fR263- \fBtoggle\fR264- \fBtoggle-all\fR265- \fBtoggle-down\fR \fIctrl-i (tab)\fR266- \fBtoggle-in\fR (\fB--reverse\fR ? \fBtoggle-up\fR : \fBtoggle-down\fR)267- \fBtoggle-out\fR (\fB--reverse\fR ? \fBtoggle-down\fR : \fBtoggle-up\fR)268- \fBtoggle-sort\fR (equivalent to \fB--toggle-sort\fR)269- \fBtoggle-up\fR \fIbtab (shift-tab)\fR270- \fBunix-line-discard\fR \fIctrl-u\fR271- \fBunix-word-rubout\fR \fIctrl-w\fR272- \fBup\fR \fIctrl-k ctrl-p up\fR273- \fByank\fR \fIctrl-y\fR274-.RE186+.B BASE SCHEME:187+ (default: dark on 256-color terminal, otherwise 16)188 276-.RS277-With \fBexecute(...)\fR action, you can execute arbitrary commands without278-leaving fzf. For example, you can turn fzf into a simple file browser by279-binding \fBenter\fR key to \fBless\fR command like follows.189+ \fBdark \fRColor scheme for dark 256-color terminal190+ \fBlight \fRColor scheme for light 256-color terminal191+ \fB16 \fRColor scheme for 16-color terminal192+ \fBbw \fRNo colors193 281-.RS282-\fBfzf --bind "enter:execute(less {})"\fR194+.B COLOR:195+ \fBfg \fRText196+ \fBbg \fRBackground197+ \fBhl \fRHighlighted substrings198+ \fBfg+ \fRText (current line)199+ \fBbg+ \fRBackground (current line)200+ \fBhl+ \fRHighlighted substrings (current line)201+ \fBinfo \fRInfo202+ \fBprompt \fRPrompt203+ \fBpointer \fRPointer to the current line204+ \fBmarker \fRMulti-select marker205+ \fBspinner \fRStreaming input indicator206+ \fBheader \fRHeader207 .RE284-285-\fB{}\fR is the placeholder for the double-quoted string of the current line.286-If the command contains parentheses, you can use any of the following287-alternative notations to avoid parse errors.288-289- \fBexecute[...]\fR290- \fBexecute~...~\fR291- \fBexecute!...!\fR292- \fBexecute@...@\fR293- \fBexecute#...#\fR294- \fBexecute$...$\fR295- \fBexecute%...%\fR296- \fBexecute^...^\fR297- \fBexecute&...&\fR298- \fBexecute*...*\fR299- \fBexecute;...;\fR300- \fBexecute/.../\fR301- \fBexecute|...|\fR302- \fBexecute:...\fR303-.RS304-This is the special form that frees you from parse errors as it does not expect305-the closing character. The catch is that it should be the last one in the306-comma-separated list.307-.RE308-309-\fBexecute-multi(...)\fR is an alternative action that executes the command310-with the selected entries when multi-select is enabled (\fB--multi\fR). With311-this action, \fB{}\fR is replaced with the double-quoted strings of the312-selected entries separated by spaces.313-314-.RE208 .TP209+.B "--black"210+Use black background211+.SS History212+.TP213 .BI "--history=" "HISTORY_FILE"214 Load search history from the specified file and update the file on completion.215 When enabled, \fBCTRL-N\fR and \fBCTRL-P\fR are automatically remapped to216 \fBnext-history\fR and \fBprevious-history\fR.217 .TP218 .BI "--history-size=" "N"219 Maximum number of entries in the history file (default: 1000). The file is220 automatically truncated when the number of the lines exceeds the value.221+.SS Preview222 .TP325-.BI "--header=" "STR"326-The given string will be printed as the sticky header. The lines are displayed327-in the given order from top to bottom regardless of \fB--reverse\fR option, and328-are not affected by \fB--with-nth\fR. ANSI color codes are processed even when329-\fB--ansi\fR is not set.223+.BI "--preview=" "COMMAND"224+Execute the given command for the current line and display the result on the225+preview window. \fB{}\fR is the placeholder for the quoted string of the226+current line.227+228+.RS229+e.g. \fBfzf --preview="head -$LINES {}"\fR230+.RE231 .TP331-.BI "--header-lines=" "N"332-The first N lines of the input are treated as the sticky header. When333-\fB--with-nth\fR is set, the lines are transformed just like the other334-lines that follow.232+.BI "--preview-window=" "[POSITION][:SIZE[%]][:hidden]"233+Determine the layout of the preview window. If the argument ends with234+\fB:hidden\fR, the preview window will be hidden by default until235+\fBtoggle-preview\fR action is triggered.236+237+.RS238+.B POSITION: (default: right)239+ \fBup240+ \fBdown241+ \fBleft242+ \fBright243+.RE244+245+.RS246+e.g. \fBfzf --preview="head {}" --preview-window=up:30%\fR247+ \fBfzf --preview="file {}" --preview-window=down:1\fR248+.RE249 .SS Scripting250 .TP251 .BI "-q, --query=" "STR"252 Start the finder with the given query16 unmodified lines269 the default enter key. When this option is set, fzf will print the name of the270 key pressed as the first line of its output (or as the second line if271 \fB--print-query\fR is also used). The line will be empty if fzf is completed272 with the default enter key.273+274 .RS275 e.g. \fBfzf --expect=ctrl-v,ctrl-t,alt-s,f1,f2,~,@\fR276 .RE277 .TP278 .B "--sync"279 Synchronous search for multi-staged filtering. If specified, fzf will launch280 ncurses finder only after the input stream is complete.281+282 .RS283 e.g. \fBfzf --multi | fzf --sync\fR284 .RE285 370-.SH ENVIRONMENT286+.SH ENVIRONMENT VARIABLES287 .TP288 .B FZF_DEFAULT_COMMAND289 Default command to use when input is tty290 .TP45 unmodified lines336 occurrences of the string.337 338 .SS Anchored-match339 A term can be prefixed by \fB^\fR, or suffixed by \fB$\fR to become an424-anchored-match term. Then fzf will search for the items that start with or end340+anchored-match term. Then fzf will search for the lines that start with or end341 with the given string. An anchored-match term is also an exact-match term.342 343 .SS Negation428-If a term is prefixed by \fB!\fR, fzf will exclude the items that satisfy the344+If a term is prefixed by \fB!\fR, fzf will exclude the lines that satisfy the345 term from the result.346 347 .SS Exact-match by default348 If you don't prefer fuzzy matching and do not wish to "quote" (prefixing with6 unmodified lines355 \fBrb\fR, or \fBpy\fR.356 357 e.g. \fB^core go$ | rb$ | py$\fR358 359+.SH KEY BINDINGS360+You can customize key bindings of fzf with \fB--bind\fR option which takes361+a comma-separated list of key binding expressions. Each key binding expression362+follows the following format: \fBKEY:ACTION\fR363+364+e.g. \fBfzf --bind=ctrl-j:accept,ctrl-k:kill-line\fR365+366+.B AVAILABLE KEYS: (SYNONYMS)367+ \fIctrl-[a-z]\fR368+ \fIalt-[a-z]\fR369+ \fIf[1-10]\fR370+ \fIenter\fR (\fIreturn\fR \fIctrl-m\fR)371+ \fIspace\fR372+ \fIbspace\fR (\fIbs\fR)373+ \fIalt-enter\fR374+ \fIalt-space\fR375+ \fIalt-bspace\fR (\fIalt-bs\fR)376+ \fIalt-/\fR377+ \fItab\fR378+ \fIbtab\fR (\fIshift-tab\fR)379+ \fIesc\fR380+ \fIdel\fR381+ \fIup\fR382+ \fIdown\fR383+ \fIleft\fR384+ \fIright\fR385+ \fIhome\fR386+ \fIend\fR387+ \fIpgup\fR (\fIpage-up\fR)388+ \fIpgdn\fR (\fIpage-down\fR)389+ \fIshift-left\fR390+ \fIshift-right\fR391+ \fIdouble-click\fR392+ or any single character393+394+ \fBACTION: DEFAULT BINDINGS (NOTES):395+ \fBabort\fR \fIctrl-c ctrl-g ctrl-q esc\fR396+ \fBaccept\fR \fIenter double-click\fR397+ \fBbackward-char\fR \fIctrl-b left\fR398+ \fBbackward-delete-char\fR \fIctrl-h bspace\fR399+ \fBbackward-kill-word\fR \fIalt-bs\fR400+ \fBbackward-word\fR \fIalt-b shift-left\fR401+ \fBbeginning-of-line\fR \fIctrl-a home\fR402+ \fBcancel\fR403+ \fBclear-screen\fR \fIctrl-l\fR404+ \fBdelete-char\fR \fIdel\fR405+ \fBdelete-char/eof\fR \fIctrl-d\fR406+ \fBdeselect-all\fR407+ \fBdown\fR \fIctrl-j ctrl-n down\fR408+ \fBend-of-line\fR \fIctrl-e end\fR409+ \fBexecute(...)\fR (see below for the details)410+ \fBexecute-multi(...)\fR (see below for the details)411+ \fBforward-char\fR \fIctrl-f right\fR412+ \fBforward-word\fR \fIalt-f shift-right\fR413+ \fBignore\fR414+ \fBjump\fR (EasyMotion-like 2-keystroke movement)415+ \fBjump-accept\fR (jump and accept)416+ \fBkill-line\fR417+ \fBkill-word\fR \fIalt-d\fR418+ \fBnext-history\fR (\fIctrl-n\fR on \fB--history\fR)419+ \fBpage-down\fR \fIpgdn\fR420+ \fBpage-up\fR \fIpgup\fR421+ \fBprevious-history\fR (\fIctrl-p\fR on \fB--history\fR)422+ \fBprint-query\fR (print query and exit)423+ \fBselect-all\fR424+ \fBtoggle\fR425+ \fBtoggle-all\fR426+ \fBtoggle-down\fR \fIctrl-i (tab)\fR427+ \fBtoggle-in\fR (\fB--reverse\fR ? \fBtoggle-up\fR : \fBtoggle-down\fR)428+ \fBtoggle-out\fR (\fB--reverse\fR ? \fBtoggle-down\fR : \fBtoggle-up\fR)429+ \fBtoggle-preview\fR430+ \fBtoggle-sort\fR (equivalent to \fB--toggle-sort\fR)431+ \fBtoggle-up\fR \fIbtab (shift-tab)\fR432+ \fBunix-line-discard\fR \fIctrl-u\fR433+ \fBunix-word-rubout\fR \fIctrl-w\fR434+ \fBup\fR \fIctrl-k ctrl-p up\fR435+ \fByank\fR \fIctrl-y\fR436+437+With \fBexecute(...)\fR action, you can execute arbitrary commands without438+leaving fzf. For example, you can turn fzf into a simple file browser by439+binding \fBenter\fR key to \fBless\fR command like follows.440+441+ \fBfzf --bind "enter:execute(less {})"\fR442+443+\fB{}\fR is the placeholder for the quoted string of the current line.444+If the command contains parentheses, you can use any of the following445+alternative notations to avoid parse errors.446+447+ \fBexecute[...]\fR448+ \fBexecute~...~\fR449+ \fBexecute!...!\fR450+ \fBexecute@...@\fR451+ \fBexecute#...#\fR452+ \fBexecute$...$\fR453+ \fBexecute%...%\fR454+ \fBexecute^...^\fR455+ \fBexecute&...&\fR456+ \fBexecute*...*\fR457+ \fBexecute;...;\fR458+ \fBexecute/.../\fR459+ \fBexecute|...|\fR460+ \fBexecute:...\fR461+.RS462+This is the special form that frees you from parse errors as it does not expect463+the closing character. The catch is that it should be the last one in the464+comma-separated list.465+.RE466+467+\fBexecute-multi(...)\fR is an alternative action that executes the command468+with the selected entries when multi-select is enabled (\fB--multi\fR). With469+this action, \fB{}\fR is replaced with the quoted strings of the selected470+entries separated by spaces.471+472 .SH AUTHOR473 Junegunn Choi (\fIjunegunn.c@gmail.com\fR)474 475 .SH SEE ALSO14 unmodified linesmodified:src/constants.go+1 added-1 removed
6 unmodified lines7 )8 9 const (10 // Current version11- version = "0.12.2"11+ version = "0.13.0"12 13 // Core14 coordinatorDelayMax time.Duration = 100 * time.Millisecond15 coordinatorDelayStep time.Duration = 10 * time.Millisecond45 unmodified linesmodified:CHANGELOG.md+7 added-3 removed
1 CHANGELOG2 =========3 4-0.12.34+0.13.05 ------6-- `{}` in execute action is replaced to the single-quoted string of the7- current line6+- Added preview feature7+ - `--preview CMD`8+ - `--preview-window POS[:SIZE][:hidden]`9+- `{}` in execute action is now replaced to the single-quoted (instead of10+ double-quoted) string of the current line11+- Fixed to ignore control characters for bracketed paste mode12 13 0.12.214 ------15 399 unmodified linesmodified:install+2 added-2 removed
1 #!/usr/bin/env bash2 3 set -u4 5-[[ "$@" =~ --pre ]] && version=0.12.2 pre=1 ||6- version=0.12.2 pre=05+[[ "$@" =~ --pre ]] && version=0.13.0 pre=1 ||6+ version=0.13.0 pre=07 8 auto_completion=9 key_bindings=10 update_config=2387 unmodified lines