Commit Graph

53 Commits (master)

Author SHA1 Message Date
Junegunn Choi f864f8b5f7
Respect $FZF_DEFAULT_OPTS_FILE in key bindings and completion (#3742)
Fix #3740
1 month ago
Junegunn Choi 128e4a2e8d
[fish] Fix $dir in FZF_{CTRL_T,ALT_C}_COMMAND not evaluated
Fix #3705
2 months ago
zeertzjq 25e61056b6
[fish] Fix Ctrl-T and Alt-C not using last token as search root (#3684) 2 months ago
Eli Barzilay 88f4c16755
Make it possible to disable `Ctrl+T` / `Alt+C` / completions (#3678)
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>
2 months ago
Junegunn Choi d282a1649d
Add walker options and replace 'find' with the built-in walker (#3649) 2 months ago
Christoph Anton Mitterer 7e89458a3b
[fish] exit as well when called from non-interactive shell (#3467)
Just like with the other shells, exit fish to, if called from a non-interactive
shell.

We cannot use `return`, as older versions of fish (namely < 3.4.0) did not
support to use `return` in `.`-scripts (this was only added with fish commit
3359e5d2e9bcbf19d1652636c8e448a6889302ae).

Unlike in POSIX, fish’s `exit` is however documented to no cause the calling
shell to exit when executed in a sourced script (see:
0f70b2c0d3/doc_src/cmds/exit.rst?plain=1#L20
)

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
7 months ago
Christoph Anton Mitterer 8eec50d764 [shell] don’t needlessly escape `.` in shell pattern
`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>
8 months ago
Junegunn Choi 2bed7d370e
[shell] Use --scheme=path when appropriate
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
8 months ago
Junegunn Choi f931e53890
[fish] Do not use `builtin cd`
`builtin cd` of fish doesn't support `cd -`

Close #2967
2 years ago
Junegunn Choi 6fb41a202a
Add --scheme=[default|path|history] option to choose scoring scheme
Close #2909
Close #2930
2 years ago
Ajeet D'Souza 54841248e7
[shell] ALT-C: Use builtin cd to avoid conflicts (#2799) 2 years ago
zsugabubus 205f885d69
[shell] Use cd -- (#2659)
Otherwise directories starting with '-' may treated as options.
3 years ago
Jannik Vieten f4e1ed25f2
[fish] Make widgets work with --option= prefix (#2383)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
3 years ago
Junegunn Choi b234647a63
[shell] Disable CTRL-Z
Fix #2289
3 years ago
Andrew Zhou 6c9adea0d3
[fish] Fix parser handling of option-like args (#2208)
Fixes error when option-like args are parsed (e.g. "-1").
4 years ago
Junegunn Choi bf65e8cd12 [fzf-tmux] Add option to start fzf in tmux popup window
Requires latest tmux built from source (e.g. brew install tmux --HEAD)

Examples:

  # 50%/50% width and height on the center of the screen
  fzf-tmux -p

  # 80%/80%
  fzf-tmux -p80%

  # 80%/40%
  fzf-tmux -p80%,40%

  # Separate -w and -h
  fzf-tmux -w80% -h40%

  # 80%/40% at position (0, 0)
  fzf-tmux -w80% -h40% -x0 -y0

You can configure key bindings and fuzzy completion to open in tmux
popup window like so:

  FZF_TMUX_OPTS='-p 80%'
4 years ago
Junegunn Choi afa2c4e0af
[fish] Ignore empty environment variables 4 years ago
ssjhv e7097a9d25 [fish] Remove perl from fish key bindings (#1635)
Perl was used to remove the trailing newline character, but fzf already
has --print0 to use null character as terminators, and fish read -z is
expecting null character as terminators. There is no reason to depend on
perl if --print0 is passed to fzf invocation.
5 years ago
Oliver Schrenk 5004ae3457 [fish] Use $version instead of $FISH_VERSION (#1100)
$FISH_VERSION is dropped in 2.7, but every version has $version

- https://github.com/fish-shell/fish-shell/issues/4414
- fb8ae04f80

Comment from @faho in #1316:

Unfortunately, $FISH_VERSION was only ever a thing from fish 2.0 to fish 2.7.1.

All fish versions from the very beginning though used a variable called simply "$version" to store their version, so that is the one that should be used.
6 years ago
Tom Fitzhenry 7b5ccc45bc [fish] Fix ctrl-r regression in versions <2.4 (#972)
Close #966
7 years ago
John Nguyen 70cfa6af13 [fish] Accept starting dir for <M-c> key binding (#944)
This also modifies <C-t> behaviour.
The longest file path in the input is used as root directory for `find`
command. The remainder of the input is passed to fzf's --query as a
initial search parameters.
7 years ago
Tom Fitzhenry dbcaec59ae [fish] Support multiline commands (#954)
Fix found by @amosbird at https://github.com/junegunn/fzf/issues/953#issuecomment-310309055

closes #440
7 years ago
John Nguyen 1a68698d76 [fish] Fix <C-t> completion for current dir search (#946)
If "." is given as the argument to begin <C-t> completion, the leading
"." is not correctly removed. In general, if user selects a fzf
completion, the current token should be "consumed".
7 years ago
Junegunn Choi 842a73357c
[fish] Fix CTRL-T with paths that don't start with ./
Close #943
7 years ago
Junegunn Choi c387689d1c
[shell] Enable sorting by default in CTRL-R
CTRL-R binding used to start with --no-sort to list the matched commands
in chronological order. However, it has been a constant source of
confusion. Let's enable it by default from now on. The sorted result
shouldn't be too confusing as we use --tiebreak=index.
7 years ago
Junegunn Choi 11407bf656
Exclude sysfs in find commands 7 years ago
Pierre Neidhardt ce43ea9f42 [shell] Replace `sed` with `-mindepth 1` and `cut` (#844) 7 years ago
Junegunn Choi 95c77bfb98
Use --bind instead of --toggle-sort
Related #822
7 years ago
Junegunn Choi dbddee9de9
[fish] Add toggle-sort back to CTRL-R (#759) 7 years ago
Junegunn Choi 8ac37d5927
[shell] Do not override --reverse in CTRL-R
Close #807
7 years ago
Junegunn Choi 208d4f2173
[shell] Make layout configurable via $FZF_DEFAULT_OPTS and $FZF_{KEY}_OPTS 7 years ago
Junegunn Choi 1448d631a7
Add --height option 7 years ago
Pierre Neidhardt c7b0764002 [shell] Use '-mindepth 1' to omit root folder in 'find' output (#779)
This removes the need for the 'sed' call. Faster, cleaner.
8 years ago
Pierre Neidhardt 0508e70f9b Overhaul fish functions (#759)
Replace the "temp file" workaround with the "read" function: it's
simpler and faster.

Use proper escaping, remove the custom function.

The "file" widget uses last token as root for the "find" command.
This replaces the equivalent of '**' completion in bash/zsh.
The "$dir" non-expanded variable can be used in FZF_CTRL_T_COMMAND to
set the root.
8 years ago
Junegunn Choi c49e65d926
[shell] Fix pruning condition of find command for CTRL-T and ALT-C
`-fstype dev` is invalid. It's devfs on macOS and devtmpfs on Linux.
8 years ago
Pierre Neidhardt 2134c0c8a9 key-bindings.fish: Yank commandline in fzf-history-widget 8 years ago
Junegunn Choi c39c039e15
[shell] Add $FZF_CTRL_T_OPTS and $FZF_ALT_C_OPTS
Close #596
8 years ago
Junegunn Choi e986f20a85 [fish] Use consistent function names for key bindings (#546)
- fzf-file-widget
- fzf-history-widget
- fzf-cd-widget
8 years ago
Junegunn Choi 772fa42dcb [fish] Fix intermittent errors on CTRL-T
Related: 23244bb
8 years ago
Junegunn Choi a57b375b41 Add $FZF_CTRL_R_OPTS for overriding the default options for CTRL-R
Close #526
8 years ago
Junegunn Choi 23244bb410 [fish] Fix intermittent errors on CTRL-T
This seems like a bug of fish, but sometimes when you select an item
fish complains:

"insertion mode switches can not be used when not in insertion mode"

This only happens when using tmux pane. Injecting a dummy command
somehow fixes the issue.
8 years ago
Junegunn Choi e99731ea85 [shell] Add FZF_ALT_C_COMMAND for ALT-C (#408) 9 years ago
Michał Kalbarczyk 5baf1c5536 fix fish streams 9 years ago
Junegunn Choi 938151a834 [shell] Add FZF_CTRL_T_COMMAND for CTRL-T
Close #40
9 years ago
Junegunn Choi c8f208b96b Merge pull request #171 from oschrenk/vi-insert-mode-key-bindings-fish
Support for vi insert mode in upcoming fish 2.2.0
9 years ago
Oliver Schrenk 2e339e49b8 Support for vi insert mode in upcoming fish 2.2.0 9 years ago
Junegunn Choi 305ec3b3ce [fish] Remove buffering delay by not using subroutines
Close #169
9 years ago
Junegunn Choi 06b4f75680 Fix broken FZF_TMUX switch and update test cases (#203) 9 years ago
Junegunn Choi 318edc8c35 Apply fzf-tmux to key bindings (#203)
Note that CTRL-T on bash is still using the old trick of send-keys.
9 years ago
Junegunn Choi d08542ce5d Prepare for 0.9.9 release 9 years ago