From f90de1eb752762eca077448b17b3fdf31db09bbe Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 14 Dec 2016 01:52:41 +0900 Subject: [PATCH] Updated Configuring shell key bindings (markdown) --- Configuring-shell-key-bindings.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Configuring-shell-key-bindings.md b/Configuring-shell-key-bindings.md index cabc126..310c0cd 100644 --- a/Configuring-shell-key-bindings.md +++ b/Configuring-shell-key-bindings.md @@ -9,6 +9,14 @@ You can preview the content of the file under the cursor by setting `--preview` export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" ``` +### Using `--select-1` and/or `--exit-0` + +```sh +export FZF_CTRL_T_OPTS="--select-1 --exit-0" +``` + +`--select-1` automatically selects the item if there's only one so that you don't have to press enter key. Likewise, `--exit-0` automatically exits when the list is empty. These options are also useful in `FZF_ALT_C_OPTS`. + ## `CTRL-R` ### Sorting and exact matching