Commit Graph

1766 Commits (334a4fa15920b08f7be2432398e620587cc6f079)
 

Author SHA1 Message Date
Junegunn Choi 334a4fa159
0.21.1 4 years ago
Junegunn Choi 21f94ee800 [fzf-tmux] Split zsh variable expansion for old zsh
The following code works in zsh 5.8 but not in 5.4

  ${(Q)${(Z+n+)FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}}}
4 years ago
Junegunn Choi 540bfd7a72 [fzf-tmux] Fall back to plain fzf when split failed 4 years ago
Junegunn Choi 8fbed2b13a [fzf-tmux] Use $PWD instead of #{pane_current_path}
Related: https://github.com/tmux/tmux/issues/1282
4 years ago
Junegunn Choi aa17510e0a [fzf-tmux] Set default horizontal margin 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
lacygoill 0f5c6e8f04
[vim] Fix issue with multiple popups (#1927)
Invoking fzf from an existing Vim popup terminal is a special case.
It requires some new code to avoid E994 from being raised and the user
being stuck in a non-closable popup window.

Fix #1916
4 years ago
Roman Perepelitsa b1b916ce15
[zsh] Ensure that fzf code always parses the same way (#1944)
At the top of each zsh file options are set to their
standard values (those marked with <Z> in `man zshoptions`)
and `aliases` option is disabled.

At the bottom of the file the original options are restored.

Fix #1938
4 years ago
Alexandr a6a732e1fc
Update AtomicBool to use atomic memory operation (#1939) 4 years ago
Junegunn Choi a5c2f28539
Fix failing test case 4 years ago
Junegunn Choi 18261fe31c
[shell] Update CTRL-R to remove duplicate commands
Close #1940
Related: #1363 #749 #270 #49 #88 #492 #600
4 years ago
Chitoku 079046863c
[zsh-completion] Fix a bug where _fzf_complete did not iterate through args (#1936) 4 years ago
Junegunn Choi 07b965bba1
Fix ANSI color offsets when --keep-right is used 4 years ago
Junegunn Choi c39113ee41
[windows] Do not include directories in the list
Fix #1926
4 years ago
Junegunn Choi 14f90502a4
[bash] Restore --nth option in CTRL-R 4 years ago
Junegunn Choi b0673c3563
0.21.0 4 years ago
Junegunn Choi 373c6d8d55
Add --keep-right option to keep the right end of the line visible
Close #1652
4 years ago
Junegunn Choi b8fc828955
Fix completion test 4 years ago
Jakub Łuczyński b43b040512
Fuzzy completions: removed leftover debug echo (#1921) 4 years ago
Junegunn Choi 50b7608f9d
Change custom fuzzy completion API
To make it easier to write more complex fzf options. Although this
does not break backward compatibility, users are encouraged to update
their code accordingly.

  # Before
  _fzf_complete "FZF_ARG1 FZF_ARG2..." "$@" < <(
    # Print candidates
  )

  # After
  _fzf_complete FZF_ARG1 FZF_ARG2... -- "$@" < <(
    # Print candidates
  )
4 years ago
Kahlil (Kal) Hodgson 7085e5b629
Add explanation for the `g:fzf_colors` setting (#1878)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
4 years ago
Michael Kelley 7d5985baf9
Make height option work under Windows (#1341)
Separate Unix & Windows code into platform specific files for light renderer
4 years ago
Junegunn Choi 7c40a424c0
Add retries to CTRL-R tests to avoid intermittent errors on Travis CI
- https://travis-ci.org/junegunn/fzf/jobs/659496745#L676

Related #1900
4 years ago
Junegunn Choi baf882ace7
[completion] Use file redirection instead of pipe
This change allows the completion system of bash and zsh to return
before the input process completes.

Related #1887
4 years ago
Junegunn Choi ba82f0bef9
Do not read more than 10K characters from /dev/tty
This might help with #1456 where fzf hangs consuming CPU resources.
4 years ago
Junegunn Choi d9c6a0305b
Draft CHANGELOG for the upcoming release 4 years ago
Junegunn Choi d9b1211191
Add more --border options; default changed to "rounded"
--border option now takes an optional argument that defines the style

  - rounded (new default)
  - sharp
  - horizontal (previous default)
4 years ago
Junegunn Choi 99f1e02766
Fix flaky test case
Make sure that the shell is ready before hitting CTRL-R

      1) Error:
    TestFish#test_ctrl_r_multiline:
    RuntimeError: timeout
        test/test_go.rb:50:in `wait'
        test/test_go.rb:125:in `until'
        test/test_go.rb:1857:in `test_ctrl_r_multiline'
4 years ago
Junegunn Choi 242c0db26b
[vim] Fix height calculation
Fix #1418

e.g.
  call fzf#run({'source': [1, 2, 3], 'down': '~50%', 'options': "--border --header $'1\n2'"})
4 years ago
Junegunn Choi dd49e41c42
Ignore xterm OSC control sequences
- OSC Ps ; Pt BEL
- OSC Ps ; Pt ST

Fix #1415
4 years ago
Junegunn Choi 6db15e8693
[vim] Throw error when popup support is unavailable
https://github.com/junegunn/fzf.vim/issues/943
https://github.com/junegunn/fzf.vim/issues/959
4 years ago
Junegunn Choi 4c9cab3f8a
Fix prefix/suffix/equal matcher to trim whitespaces
- Prefix matcher will trim leading whitespaces only when the pattern
  doesn't start with a whitespace
- Suffix matcher will trim trailing whitespaces only when the pattern
  doesn't end with a whitespace
- Equal matcher will trim leading whitespaces only when the pattern
  doesn't start with a whitespace, and trim trailing whitespaces only
  when the pattern doesn't end with a whitespace

Previously, only suffix matcher would trim whitespaces unconditionally.

Fix #1894
4 years ago
Junegunn Choi b2c0413a98
[bash] Fix --query argument of CTRL-R
Fix #1898
4 years ago
Jack Bates e34c7c00b1
Test multi-line C-r (#1892) 4 years ago
Jack Bates 7c447bbdc7
[bash] Start C-r search with current command line (#1886)
Restore the original line when search is aborted. Add --query
"$READLINE_LINE" and fall back to the current behavior pre Bash 4.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
4 years ago
Junegunn Choi 7bf1f2cc84
Clean up test shell initialization
- Fix 'make docker-test'
- Set fish_history to an empty string since 'fish --private' is not
  available prior to fish 3.0
4 years ago
Junegunn Choi afa2c4e0af
[fish] Ignore empty environment variables 4 years ago
Junegunn Choi 2ff7db1b36
Use a more robust way to check if the shell is ready 4 years ago
James Wright 9f0626da64
Add backward-delete-char/eof action (#1891)
'backward-delete-char/eof' will either abort if query is
empty or delete one character backwards.
4 years ago
Chris d8cb5c1cf5
Update README.md: MacPorts upgrade instruction (#1893) 4 years ago
Junegunn Choi dca56da0ef
Add 'insert' key for --bind
Close #1744
4 years ago
Junegunn Choi ec75d16ea8
Fix panic on unexpected escape sequences 4 years ago
Jack Bates 5cae8ea733
[bash] Multiline C-r without histexpand (#1837)
Close #1370 

Parses the history list, converts it to a NUL-delimited list of possibly
multiline entries. Adds the fzf --read0 option. Works with and without
histexpand enabled.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
4 years ago
Jack Bates 1ccd8f6a64
[bash] Restore insertion point pre Bash 4 (#1881)
Make C-t more consistent pre and post Bash 4. It already kills the
command line separately before and after the insertion point. Add
set-mark and exchange-point-and-mark to restore the insertion point
after yanking back and apply the same behavior to M-c.

* CTRL-T should put extra space after pasted items

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
4 years ago
Jack Bates 9c293bb82b
[bash] Put C-t items at point in vi mode (#1876)
Be consistent with emacs mode and put the items at the point vs. the end
of the command line.
4 years ago
Junegunn Choi 9897ee9591
[bash] Strip trailing whitespace on kill completion 4 years ago
Junegunn Choi 5215415315
[completion] Allow users to customize fzf options via _fzf_comprun
Related #1809 #1850
4 years ago
Junegunn Choi 54891d11e0
[bash-completion] Minor optimization 4 years ago
Junegunn Choi 567c8303bf
Update ANSI processor to handle "rmso" and "rmul"
Fix #1877
4 years ago
Hiroki Konishi 2a60edcd52
Make pointer and multi-select marker customizable (#1844)
Add --pointer and --marker option which can provide additional context to the user
4 years ago