diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-10-23 21:37:20 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-10-23 21:37:20 +0900 |
commit | a4d9b0b468b872180cbfa851be236098756b5e62 (patch) | |
tree | e46a5d679ad68feda614b891c5260546beac2e11 /man | |
parent | e2b87e0d741111fd1f437f8e06f8286d9ef47dff (diff) |
Support ANSI escape sequence for clearing display in preview window
fzf --preview 'for i in $(seq 100000); do
(( i % 200 == 0 )) && printf "\033[2J"
echo "$i"
sleep 0.01
done'
Diffstat (limited to 'man')
-rw-r--r-- | man/man1/fzf.1 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index d0e27908..f48c8424 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -379,6 +379,18 @@ Note that you can escape a placeholder pattern by prepending a backslash. Preview window will be updated even when there is no match for the current query if any of the placeholder expressions evaluates to a non-empty string. + +Since 0.24.0, fzf can render partial preview content before the preview command +completes. ANSI escape sequence for clearing the display (\fBCSI 2 J\fR) is +supported, so you can use it to implement preview window that is constantly +updating. + +e.g. + \fBfzf --preview 'for i in $(seq 100000); do + (( i % 200 == 0 )) && printf "\\033[2J" + echo "$i" + sleep 0.01 + done'\fR .RE .TP .BI "--preview-window=" "[POSITION][:SIZE[%]][:rounded|sharp|noborder][:[no]wrap][:[no]cycle][:[no]hidden][:+SCROLL[-OFFSET]][:default]" @@ -389,7 +401,6 @@ query if any of the placeholder expressions evaluates to a non-empty string. \fBdown \fBleft \fBright -.RE \fRDetermines the layout of the preview window. If the argument contains \fB:hidden\fR, the preview window will be hidden by default until |