Commit Graph

1859 Commits (552414978ed74e7cd77bd57874f6fbbe3e0024c4)
 

Author SHA1 Message Date
Junegunn Choi 60465c4664 Fix parse error of --bind expression 5 years ago
Jan Edmund Lazo c03c058bd5 [install] Support busybox uname on Windows (#1758) 5 years ago
Junegunn Choi 7238c8944d
Update CHANGELOG 5 years ago
Junegunn Choi 9a41fd5327
0.19.0 5 years ago
Junegunn Choi b471042037
Merge branch 'devel' 5 years ago
Junegunn Choi 2886f06977
Fix --preview-window noborder with non-default background color 5 years ago
Junegunn Choi d630484eeb
Update error message for --preview-window 5 years ago
Junegunn Choi e24299239e
Add `--preview-window noborder` option to disable preview border
Close #1699
5 years ago
Junegunn Choi d2fa470165
Add --info=STYLE [default|inline|hidden]
Close #1738
5 years ago
Junegunn Choi 168453da71
More key chords for --bind
Close #1752
5 years ago
Junegunn Choi 23a06d63ac
Update CHANGELOG and man pages 5 years ago
Junegunn Choi 751aa1944a
Remove trailing whitespaces when using --with-nth 5 years ago
Junegunn Choi 05b5f3f845
'reload' action should reset multi-selection 5 years ago
Marco Hinz 16fc6862a8 [nvim] Handle SIGHUP in exit handler (#1749)
In recent Nvim versions, an "Error running ..." message is shown even for normal
use cases, such as:

    :Files
    <c-\><c-n>
    :close

Closing the window will :bwipeout! the terminal buffer, because fzf sets
bufhiden=wipe.

When deleting the terminal buffer while fzf is still running, Nvim sends SIGHUP.
This happens for quite some time already, but the bug only manifests since this
commit:

  https://github.com/neovim/neovim/commit/939d9053b

It's The Right Thing to do when the application exited due to a signal.

Before that commit, no "Error running ..." message was shown, because 1 (instead
of 128 + 1 == SIGHUP) was returned which the exit handler in fzf.vim treats as
"NO MATCH".
5 years ago
Junegunn Choi 7e1c0f39e7
'reload' action should reset --header-lines 5 years ago
Junegunn Choi deccf20a35
Fix regression of select-all 5 years ago
Junegunn Choi 73c0a645e0
Remove unnecessary reader barrier on --filter mode 5 years ago
Junegunn Choi e975bd0c8d
Add test cases for --phony and reload action 5 years ago
Junegunn Choi 78da928727
Experimental implementation of "reload" action
# Reload input list with different sources
  seq 10 | fzf --bind 'ctrl-a:reload(seq 100),ctrl-b:reload(seq 1000)'

  # Reload as you type
  seq 10 | fzf --bind 'change:reload:seq {q}' --phony

  # Integration with ripgrep
  RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
  INITIAL_QUERY=""
  FZF_DEFAULT_COMMAND="$RG_PREFIX '$INITIAL_QUERY'" \
    fzf --bind "change:reload:$RG_PREFIX {q} || true" \
        --ansi --phony --query "$INITIAL_QUERY"

Close #751
Close #965
Close #974
Close #1736
Related #1723
5 years ago
Junegunn Choi 11962dabba
Add --phony option for disabling search
With --phony, fzf becomes a simply selector interface without its own
search functionality. The query string is only used for building the
command for preview or execute action.

Close #1723
5 years ago
Junegunn Choi dceb5d09cd
RTFM, please 5 years ago
Alexandr b4cccf23d4 Improvements to code quality and readability (#1737)
* Remove 1 unused field and 3 unused functions

unused elements fount by running
golangci-lint run --disable-all --enable unused

src/result.go:19:2: field `index` is unused (unused)
        index  int32
        ^
src/tui/light.go:716:23: func `(*LightWindow).stderr` is unused (unused)
func (w *LightWindow) stderr(str string) {
                      ^
src/terminal.go:1015:6: func `numLinesMax` is unused (unused)
func numLinesMax(str string, max int) int {
     ^
src/tui/tui.go:167:20: func `ColorPair.is24` is unused (unused)
func (p ColorPair) is24() bool {
                   ^

* Address warnings from "gosimple" linter

src/options.go:389:83: S1003: should use strings.Contains(str, ",,,") instead (gosimple)
        if str == "," || strings.HasPrefix(str, ",,") || strings.HasSuffix(str, ",,") || strings.Index(str, ",,,") >= 0 {
                                                                                         ^
src/options.go:630:18: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
        executeRegexp = regexp.MustCompile(
                        ^
src/terminal.go:29:16: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
        placeholder = regexp.MustCompile("\\\\?(?:{[+sf]*[0-9,-.]*}|{q}|{\\+?f?nf?})")
                      ^
src/terminal_test.go:92:10: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
        regex = regexp.MustCompile("\\w+")
                ^

* Address warnings from "staticcheck" linter

src/algo/algo.go:374:2: SA4006: this value of `offset32` is never used (staticcheck)
        offset32, T := alloc32(offset32, slab, N)
        ^
src/algo/algo.go:456:2: SA4006: this value of `offset16` is never used (staticcheck)
        offset16, C := alloc16(offset16, slab, width*M)
        ^
src/tui/tui.go:119:2: SA9004: only the first constant in this group has an explicit type (staticcheck)
        colUndefined Color = -2
        ^
5 years ago
zhaoyunfeng b911af200c
[zsh-completion] Fix prefix extraction when triggers start with ';' 5 years ago
Junegunn Choi 68683c444f
Fix argument parser for -m
/cc @tessus
5 years ago
Junegunn Choi a185593d65
Remove unnecessary map lookup 5 years ago
Junegunn Choi 525040238e
Fix behavior of 'deselect-all' to only deselect matches
To make it consistent with select-all and toggle-all.

Close #1364
5 years ago
Junegunn Choi 33f89a08f3
Build with Go 1.13 5 years ago
Junegunn Choi 11645e1fac
Fix flaky test case 5 years ago
Junegunn Choi 6390140539
[vim/windows] Use chcp only if sed is in PATH
https://github.com/junegunn/vim-plug/pull/891
5 years ago
Junegunn Choi 072066c49c
--multi to take optional argument to limit the number of selection
Close #1718
Related #688
5 years ago
Junegunn Choi a2e9366c84
Fix flaky test case 5 years ago
Simon Fraser 391669a451 Add 'f' flag for placeholder expression (#1733)
If present the contents of the selection will be placed in a temporary file,
and the filename will be placed into the string instead.
5 years ago
Junegunn Choi 0c6c76e081
[zsh] Suppress global alias expansion in widget functions
Close #1708
5 years ago
stiletto f1520bdde6 Support building on machines with `uname -m` == "aarch64" (#1710) 5 years ago
Junegunn Choi 3089880f18
[vim/windows] Fix chcp parsing for the current codepage
https://github.com/junegunn/vim-plug/pull/888
5 years ago
Junegunn Choi ab11b74be4
[vim] Output of chcp was not parsed correctly
By @gh4w and @janlazo

See 68b31a4a66
5 years ago
Junegunn Choi a5a97be017
[bash-completion] Properly handle exit event
Related #1704
5 years ago
Junegunn Choi 80b5bc1b68
[vim] Shell-escape `--color` option generated by fzf#wrap
Fix https://github.com/junegunn/fzf.vim/issues/855
5 years ago
Junegunn Choi 5c7dcaffe8
[bash-completion] _fzf_setup_completion to retain previous options 5 years ago
Junegunn Choi 5095899245
[bash-completion] Add _fzf_setup_completion to enable fuzzy completion
While we can attach `_fzf_path_completion` or `_fzf_dir_completion` to
any command using the standard bash complete command, the functionality
of the existing completion function is lost.

Use _fzf_setup_completion if you want to extend the existing function
with fuzzy completion instead of completely replacing it.

e.g. _fzf_setup_completion path kubectl
5 years ago
Ross Smith II 4800e5d2ae Add scoop mention (#1646) 5 years ago
Junegunn Choi 3b1e37f718
Fix #1657: alt-0 to alt-9 5 years ago
Christian Muehlhaeuser 6577388250 os.Kill signal cannot be trapped (#1641) 5 years ago
Christian Muehlhaeuser 3b9dbd4146 Code cleanup: remove unnecessary string conversions (#1642) 5 years ago
Christian Muehlhaeuser a1260feeed Code cleanup (#1640)
- Replaced time.Now().Sub() with time.Since()
- Replaced unnecessary string/byte slice conversions
- Removed obsolete return and value assignment in range loop
5 years ago
Dan Čermák 7322504ad0 Add installation instructions for openSUSE (#1631) 5 years ago
miclill de569f0052 Add Debian install instructions (#1620) 5 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
charlton1 c1dbc800e5 [vim] Fix name-based colors for GVim/8.0 w/o builtin terminal (#1634)
(i.e. spawn xterm)
5 years ago
Junegunn Choi 951746297e
Fix invalid layout example 5 years ago