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