Commit Graph

325 Commits

Author SHA1 Message Date
bitraid
0167691941 [fish] Small syntax modification of some commands
No actual change, just for consistency with the rest of the code.
2024-12-19 20:50:04 +09:00
bitraid
3b0f976380 [fish] Enable home dir expansion of leading ~/
Enable expanding to user's home directory, when pressing <Ctrl-T> or
<Alt-C>, and the current command line token starts with `~/`.
2024-12-19 20:50:04 +09:00
bitraid
7bd298b536 [fish] Don't strip leading dot (.) character
Fix the removal of the leading dot character from the query, when
<Ctrl-T> was pressed and the current command line token started with a
dot. It was also removed when <Alt-C> was pressed and the directory
didn't exist under the current path.
2024-12-19 20:50:04 +09:00
LangLangBart
a6957aba11
chore: completion test command sequence (#4115)
cleanup zsh global scope
2024-12-03 20:34:26 +09:00
bitraid
2b7f168571 [fish] Enable keys for scripts that use read
Remove the check that exits when the shell is non-interactive, so that
the key bindings will work for the read command, when used by scripts.
2024-11-18 19:08:34 +09:00
bitraid
5b3da1d878 [fish] Use more native syntax
Mainly, replace [ with test. Also, change $FZF_TMUX check from numeric
to string, so that it won't show error if doesn't contain a number.
2024-11-18 19:08:34 +09:00
bitraid
99f1bc0177 [fish] Format history using builtins if perl is missing 2024-11-18 19:08:34 +09:00
bitraid
ed76f076dd [fish] Replace external commands with builtins
- Use `string collect` instead of cat to get the contents of
  $FZF_DEFAULT_OPTS_FILE. Also, check if the file is readable first.
- Use `string split` instead of cut to set $FISH_MAJOR, $FISH_MINOR.
- Use `string replace` instead of perl to strip leading tabs.
2024-11-18 19:08:34 +09:00
bitraid
4d357d1063 [fish] Improve commandline parsing
- Enable using unescaped quotes for exact-match, exact-boundary-match.
- Enable suffix-exact-match.
- Enable inverse-exact-match, inverse-prefix/suffix-exact-match.
- Allow searching for double quotes and backslashes.
- Combine multiple consecutive slashes into one.
- Workaround for test command bug, allowing $dir or $commandline be a
  single `!`.
2024-11-18 19:08:34 +09:00
LangLangBart
03d6ba7496
fix(zsh): handle backtick trigger edge case (#4090) 2024-11-14 16:07:52 +09:00
LangLangBart
71e4d5cc51
revert(zsh): remove 'fc -RI' call in the history widget (#4093) 2024-11-14 10:38:05 +09:00
林千里
0c64c68781
Fix zsh $+name syntax does not work with setopt ksh_arrays (#4084) 2024-11-12 00:53:36 +09:00
LangLangBart
57c08d925f
Enhance command extraction in zsh completion (#4082)
Fix #1992
2024-11-10 17:40:59 +09:00
LangLangBart
0607227730
fix(zsh): move 'fc -RI' inside command substitution (#4073)
* fix(zsh): move 'fc -RI' inside command substitution

* chore: follow existing option check format
2024-11-02 10:41:17 +09:00
LangLangBart
d938fdc496
fix(zsh): history loading with shared option (#4071)
Fix #4061
2024-11-01 00:19:47 +09:00
Thomas Martitz
97f1dae2d1
Use eval to evaluate $post variable as command. (#4023) 2024-10-15 18:00:27 +09:00
Koichi Murase
30a8ef28cd
[bash] Fix infinite retry loop for completion setting without "-F func" (#4004) 2024-09-23 19:16:59 +09:00
Junegunn Choi
cf2242aea3
[bash] Revert skipping setting up fuzzy path completion
This partially reverts a2d0e8f not to break backward compatibility.
2024-08-22 19:39:22 +09:00
Junegunn Choi
a2d0e8f233
[bash] Enable fuzzy path completion for all commands (#3958)
All commands with no custom completion defined.

Close #3957
2024-08-11 14:22:21 +09:00
Eduardo D Sanchez
c423c496a1
fix: Add fallback for cygwin ps (#3955) 2024-08-07 14:42:27 +09:00
LangLangBart
b4ddffdc61
fix(fish): partially revert dbe8dc3 by removing the 'builtin' for cd 2024-07-17 22:13:01 +09:00
Junegunn Choi
6cbde812f6
[bash] Add code to the default list of programs to support completion
Close #3843
2024-07-08 22:51:47 +09:00
Junegunn Choi
3b2e932c13
Bind CTRL-/ and ALT-/ to toggle-wrap by default 2024-07-08 22:51:47 +09:00
Junegunn Choi
b44ab9e33c
[completion] Use --wrap option in process completion
And remove the short preview window for showing the whole command.

Because it is important to be able to see the whole command before
deciding to kill it.
2024-07-06 10:20:58 +09:00
Junegunn Choi
23a391e715
[zsh] Fix backslash escaping (#3909)
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-05 01:46:36 +09:00
LangLangBart
e1fcdbc337
fix(zsh): use the '=~' operator instead of grep (#3906) 2024-07-03 11:03:21 +09:00
Junegunn Choi
a06745826a
[zsh] Fix completion error on openSUSE Tumbleweed
Fix suggested by @LangLangBart

Fix #3890
2024-06-28 16:59:56 +09:00
林千里
e9e0011f1d
fix 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-24 17:07:55 +09:00
LangLangBart
db01e7dab6
fix(zsh): add (s) modifier to perl command (#3882) 2024-06-20 17:51:52 +09:00
Hexin
61ae9d75b6
Remove comment in command substitution (#3875) 2024-06-19 11:22:57 +09:00
LangLangBart
22adb6494f
chore(shell): Separate declaration and assignment for zsh legacy versions (#3856) 2024-06-13 17:33:23 +09:00
Samara Jinnah
e023736c30
[zsh] Prevent glob expansion in history widget (#3855) 2024-06-13 10:43:33 +09:00
ismay
144d55a5be
[fish] Merge history before searching (#3852)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-06-12 13:56:20 +09:00
Junegunn Choi
4c83d8596d
Add new options to bash completion 2024-06-03 09:45:20 +09:00
LangLangBart
dbe8dc344e
[fish] Use builtins for cd and history (#3830)
Close #3826
2024-06-01 11:28:02 +09:00
LangLangBart
2b6d600879
[zsh] Enhance CTRL-R to display multi-line entires (#3823)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-05-31 16:57:35 +09:00
Junegunn Choi
05c765d442
[fish] Add --nth 2..,.. to allow anchored search against command 2024-05-31 16:57:35 +09:00
Junegunn Choi
7405925952
[bash] Indent multi-line history entries 2024-05-31 16:57:35 +09:00
Junegunn Choi
3afd543a7e
[fish] Use perl instead of sed to strip leading tabs
https://github.com/junegunn/fzf/pull/3807#discussion_r1619520105
2024-05-30 10:23:20 +09:00
Junegunn Choi
b4f2cde5ac
[fish] Better multi-line support for CTRL-R
Prepend each entry with an index number so that multi-line entries can
be clearly distinguished.
2024-05-29 20:16:49 +09:00
Junegunn Choi
ed53ef7cee
[shell] Add --highlight-line to CTRL-R bindings 2024-05-29 20:13:41 +09:00
LangLangBart
07880ca441
chore: Update flags to include long-form options for case (#3785) 2024-05-09 20:39:21 +09:00
Junegunn Choi
cd8d736a9f
[shell] Add $FZF_COMPLETION_{DIR,PATH}_OPTS
To allow separately overriding 'walker' options.

Close #3778
2024-05-07 19:31:56 +09:00
Junegunn Choi
7f85beccb5
[completion] Add undocumented bash variables for completion commands
And allow empty FZF_COMPLETION_DIR_COMMANDS
2024-04-27 14:14:30 +09:00
Junegunn Choi
767f1255ab
Make completion.bash load faster
* Reduce number of `__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)`s
* Clean up options in fzf completion
* Remove telnet completion
2024-04-25 16:54:51 +09:00
Junegunn Choi
f864f8b5f7
Respect $FZF_DEFAULT_OPTS_FILE in key bindings and completion (#3742)
Fix #3740
2024-04-19 22:40:38 +09:00
LangLangBart
d169c951f3
fix: Move 'emulate' command outside interactive check (#3736) 2024-04-17 18:03:12 +09:00
Junegunn Choi
152988c17b
[shell] Revert interactiveness checks for eval
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
* f103aa4753
2024-04-10 00:46:09 +09:00
Junegunn Choi
118b4d4a01
[bash] Add -o nospace to dir completion options (#1987) 2024-04-04 13:20:31 +09:00
Junegunn Choi
da14ab6f16
[bash] Remove -o default from dir completion options (#1987) 2024-04-04 12:58:52 +09:00