summaryrefslogtreecommitdiff
path: root/shell/key-bindings.zsh
AgeCommit message (Collapse)Author
2025-10-12feat: Allow disabling Ctrl-R binding in shell integration (#4535)Jacobo de Vera
Close #4417
2025-10-09CTRL-R: Bind ALT-R to toggle-rawJunegunn Choi
2025-10-09Add '--bind ctrl-x:toggle-raw' to CTRL-R bindingsJunegunn Choi
2025-09-24Apply shfmt to bash script files (make fmt)Junegunn Choi
2025-09-24make lint: Perform bash script lintingJunegunn Choi
2025-07-25fix(shell): check for mawk existence before version check (#4468)LangLangBart
close #4463
2025-06-08[bash,zsh] Separate common functions into "shell/common.sh"Koichi Murase
2025-06-08[bash,zsh] Work around Solaris awk, which is non-standardKoichi Murase
Solaris awk at /usr/bin/awk is meant for backward compatibility with an ancient implementation of 1977 awk in the original UNIX. It lacks many features of POSIX awk. To use a standard-conforming version in Solaris, one needs to explicitly use /usr/xpg4/bin/awk.
2025-06-08[bash,zsh] Work around a quirk of macOS awkKoichi Murase
macOS awk is a variant of nawk, but it contains a unique patch for the UTF-8 support. However, this patch causes the problem. If the input contains any non-UTF-8 data, macOS awk stops processing and does not do anything, instead of ignoring the unrecognized data and continue the processing. However, the contents of the ssh configuration and /etc/hosts is not under the control of fzf, so we cannot fix the input when those files contain non-UTF-8 data. To work around this behavior, one can set the locale to LC_ALL=C to treat the input data with the plain 8-bit encoding.
2025-02-20[zsh/key-bindings] don't unescape FZF_DEFAULT_OPTS (addendum: #4262)Junegunn Choi
2025-01-28Enhance --min-height option to take number followed by +Junegunn Choi
2024-11-14revert(zsh): remove 'fc -RI' call in the history widget (#4093)LangLangBart
2024-11-12Fix zsh $+name syntax does not work with setopt ksh_arrays (#4084)林千里
2024-11-10Enhance command extraction in zsh completion (#4082)LangLangBart
Fix #1992
2024-11-02fix(zsh): move 'fc -RI' inside command substitution (#4073)LangLangBart
* fix(zsh): move 'fc -RI' inside command substitution * chore: follow existing option check format
2024-11-01fix(zsh): history loading with shared option (#4071)LangLangBart
Fix #4061
2024-07-08Bind CTRL-/ and ALT-/ to toggle-wrap by defaultJunegunn Choi
2024-07-05[zsh] Fix backslash escaping (#3909)Junegunn Choi
Fix #3859 To test: FZF_CTRL_T_COMMAND="echo -E 'foo\bar\baz'; echo -E 'hello\world'" _fzf_compgen_path() { eval $FZF_CTRL_T_COMMAND } source shell/key-bindings.zsh source shell/completion.zsh
2024-07-03fix(zsh): use the '=~' operator instead of grep (#3906)LangLangBart
2024-06-24fix zsh ${(@)history} syntax does not work with ksh_arrays (#3893)林千里
When `setopt ksh_arrays` in zsh, `${(@kv)history}` gives only the first entry rather than all.
2024-06-20fix(zsh): add (s) modifier to perl command (#3882)LangLangBart
2024-06-13[zsh] Prevent glob expansion in history widget (#3855)Samara Jinnah
2024-05-31[zsh] Enhance CTRL-R to display multi-line entires (#3823)LangLangBart
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-05-29[shell] Add --highlight-line to CTRL-R bindingsJunegunn Choi
2024-04-19Respect $FZF_DEFAULT_OPTS_FILE in key bindings and completion (#3742)Junegunn Choi
Fix #3740
2024-04-17fix: Move 'emulate' command outside interactive check (#3736)LangLangBart
2024-04-10[shell] Revert interactiveness checks for evalJunegunn Choi
So that there's no error even when the scripts are mistakenly evaluated in non-interactive sessions. bash -c 'eval "$(fzf --bash)"; echo done' zsh -c 'eval "$(fzf --zsh)"; echo done' * https://github.com/junegunn/fzf/pull/3675#issuecomment-2044860901 * https://github.com/junegunn/fzf/commit/f103aa4753b435f8f45c5130323effeb75583c15
2024-03-31[shell] Make ALT-C use the absolute path to the selected directory (#3688)Emilio Vesprini
Rationale: this way the resulting cd command that ends up in the shell history can be reused to get to the same location regardless of the current working directory. Co-authored-by: LangLangBart <92653266+LangLangBart@users.noreply.github.com>
2024-03-17Make it possible to disable `Ctrl+T` / `Alt+C` / completions (#3678)Eli Barzilay
This makes it possible to skip one of the above key bindings or completions by setting a variable to an empty string. For example, FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= \ eval "$(fzf --zsh)" Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-03-13Add walker options and replace 'find' with the built-in walker (#3649)Junegunn Choi
2024-01-20[zsh] Handle '*' suffix in history line numbersJunegunn Choi
Fix #3591
2024-01-05[zsh] Make CTRL-R compatible with accept-or-print-query (#3557)danztran
Fix #3556 Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-10-14[zsh] Fix 'emulate: unknown argument -o' error on old zsh (#3465)LangLangBart
Fix #2094
2023-10-09Improve interactiveness checks (#3449)Christoph Anton Mitterer
* [bash] return instead of not executing an if-block, when non-interactive This should keep the code more readable, be less error prone (accidentally doing something outside the if-block and aligns the code with what’s already done for zsh. `0` is returned, because it shall not be considered an error when the script is (accidentally) sourced from a non-interactive shell. If executed as a script (rather than sourced), the results are not specified by POSIX but depend on the shell, with bash giving an error in that case. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> * [shell] exit immediately when called from non-interactive shell The shell execution environment shouldn’t be modified at all, when called from a non-interactive shell. It shall be noted that the current check may become error prone for bash, namely in case there should ever be a differentiation between `i` and `I` in the special variable `-` and bash’s `nocasematch`-shell-option be used. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2023-09-24[shell] don’t needlessly escape `.` in shell patternChristoph Anton Mitterer
`find`’s `-path`-option is described to use shell patterns (i.e. POSIX’ pattern matching notation). In that, `.` is not a special character, thus escaping it shouldn’t be necessary. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2023-09-19[shell] Use --scheme=path when appropriateJunegunn Choi
Without the option, you may get suboptimal results if you have many paths with spaces in their names. e.g. https://github.com/junegunn/fzf/issues/2909#issuecomment-1207690770 Close #3433
2022-10-16[shell] Make bash/zsh completion and bindings work with 'set -u' (#2999)John Fred Fadrigalan
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2022-08-28Add --scheme=[default|path|history] option to choose scoring schemeJunegunn Choi
Close #2909 Close #2930
2022-08-02[zsh] Make awk regex compatible with both GNU and macOS (#2906)kissge
2022-07-20[zsh] Replace perl with awk (#2777)Jakub Jirutka
Unlike awk, which is even defined in POSIX, perl is not pre-installed on all *nix systems. This awk command is functionally equivalent to the original perl command.
2022-04-22[shell] ALT-C: Use builtin cd to avoid conflicts (#2799)Ajeet D'Souza
2022-02-23[zsh] Set up bindings for all three keymaps: emacs, vicmd, and viinsJunegunn Choi
Fix #2694
2021-11-19[shell] Use cd -- (#2659)zsugabubus
Otherwise directories starting with '-' may treated as options.
2021-02-03[zsh] Don't run precmd hooks in cd widget (#2340)Marlon Richert
`precmd` hooks expect the Zsh Line Editor to not be active. Running these when the ZLE is active can lead to unpredictable results. See https://github.com/marlonrichert/zsh-autocomplete/issues/180
2021-01-03Revert "[zsh] Use shell redirection (#2281)"Junegunn Choi
This reverts commit e9bc7331bde238e84f24b76ebb1f5e18799b15c4. The change is no longer necessary since 090dee8.
2021-01-01[shell] Disable CTRL-ZJunegunn Choi
Fix #2289
2020-12-23[zsh] Use shell redirection (#2281)林千里
zsh sends SIGCONT when running fzf in a pipe in certain cases, causing mouse mode to become disabled Fix #2101
2020-12-09Revert "[zsh] Reload shared history before searching (#2251)"Junegunn Choi
This reverts commit b62a74b3156540cea4f12cf1d092cba77cb1db67. https://github.com/junegunn/fzf/pull/2251#issuecomment-740551383
2020-12-05[zsh] Reload shared history before searching (#2251)Martin Polden
2020-11-25[zsh] Declare variable as local before assignment (#2266)ratijas