Commit Graph

1647 Commits (751aa1944ae7fd1d8d1a12cc622f77cde160bb52)
 

Author SHA1 Message Date
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
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
Junegunn Choi 984304568d
Remove outdated GVim instruction
The section is no longer relevant since (G)Vim 8 or above has builtin
terminal emulator.
5 years ago
Junegunn Choi 723217bdea
Add fzf#run tutorial to README-VIM.md 5 years ago
Mateusz Piotrowski 0fdb71f7e4 Add FreeBSD installation instructions (#1569) 5 years ago
Junegunn Choi 12ce76b56a
[bash] Make sure to execute builtin history
Fix #1592
5 years ago
Michael Kelley 0030d18448 Update sys module to newer version (#1582)
A newer version of the sys module is needed for pull request #1341
5 years ago
Junegunn Choi 0e3e6ac442
Disallow preview scroll when the content just fits the window 5 years ago
Dominik Reller 430e8193e0 [install] Remove unused variable in install script (#1571) 5 years ago
Jesus Briales 03e8ed4d88 [bash-completion] Fix custom completion with dynamic loader enabled for non-standard command names (#1564)
Related to #1170.

Fix the solution for commands with non-standard names
where `$cmd` and `$orig_cmd` differ. e.g. `s.foo` -> `s_foo`
5 years ago
Junegunn Choi ef492f6178
Output --help message to standard output
Close #1554
5 years ago
Alexey Samoshkin 8eea45ef50 Add demo screencast video to README (#1557) 5 years ago
Junegunn Choi ff951341c9
0.18.0 5 years ago
Junegunn Choi df570afd52
[docker] Fix gem install option in Dockerfile 5 years ago