Commit Graph

370 Commits (master)

Author SHA1 Message Date
Junegunn Choi 48863ac55c
Update invalid $TERM test case 7 years ago
Junegunn Choi d18b8e0d2c
Retry flaky test cases 7 years ago
Junegunn Choi 1448d631a7
Add --height option 7 years ago
Junegunn Choi 4accc69022
Fix flaky test cases 8 years ago
Junegunn Choi 898d8d94c8
Fix issues in tcell renderer and Windows build
- Fix display of CJK wide characters
- Fix horizontal offset of header lines
- Add support for keys with ALT modifier, shift-tab, page-up and down
- Fix util.ExecCommand to properly parse command-line arguments
- Fix redraw on resize
- Implement Pause/Resume for execute action
- Remove runtime check of GOOS
- Change exit status to 2 when tcell failed to start
- TBD: Travis CI build for tcell renderer
    - Pending. tcell cannot reliably ingest keys from tmux send-keys
8 years ago
Junegunn Choi 37f2d8f795
[vim] Respect g:fzf_colors
Close #711
8 years ago
Junegunn Choi 400e443a0a
Make test cases less susceptible to timeout errors 8 years ago
Junegunn Choi 0541c0dbcf
Use relative position instead of absolute distance for --tiebreak=end
Fix unintuitive result where `*fzf*/install` is ranked higher than
`fzf/src/fzf/*fzf*-linux_386` on --tiebreak=end.
8 years ago
Junegunn Choi 401a5fd5ff
Printable character in --expect set should not affect --print-query 8 years ago
Junegunn Choi 2fc7c18747
Revise ranking algorithm 8 years ago
Junegunn Choi 822b86942c
[test] Clear environment variables 8 years ago
Junegunn Choi f787f7e651
[vim] Add fzf#wrap helper function
Close #627
8 years ago
Junegunn Choi 52cf5af91c
[test] Fix test failure on Travis CI
No guarantee in the order in which files are listed
8 years ago
Junegunn Choi 05299a0fee
[test] Use tmux buffer in unicode test cases
Related #616
8 years ago
Junegunn Choi 942ba749c7
[vim] Restore working directory even when new window is opened
Close #612
8 years ago
Junegunn Choi e455836cc9
Fix race condition where preview window is not properly cleared 8 years ago
Junegunn Choi 2bbc12063c
Add --preview and --preview-window
Close #587
8 years ago
Junegunn Choi cf9c957c66
Update test_execute_shell (#590) 8 years ago
Junegunn Choi 68b60c6d19
Update test_execute_multi (#590) 8 years ago
Junegunn Choi 3a644b16a4
Update test_execute (#590) 8 years ago
Junegunn Choi c62fc5e75c
More named keys: F5 ~ F10, ALT-/ 8 years ago
Junegunn Choi 6d235bceee
Add jump and jump-accept actions for --bind
jump and jump-accept implement EasyMotion-like movement in fzf.
Suggested by @mhrebenyuk. Close #569.
8 years ago
Junegunn Choi 9078688baf Add print-query action for --bind
Close #571
8 years ago
Junegunn Choi 9bd8b1d25f
Fix typo 8 years ago
Junegunn Choi 4ab75b68dc
Fix flaky test case: test_execute
Should wait until execute action completes
8 years ago
Junegunn Choi 73cb70dbb3
Fix flaky test case: test_file_completion_unicode 8 years ago
Junegunn Choi d082cccb6d
Fix flaky test case: test_ctrl_t_unicode
The width of the pseudo-terminal on Travis CI environment can be small
and cause the line to be wrapped.
8 years ago
Junegunn Choi 988c9bd9be [zsh] Fix issues with unicode characters 8 years ago
Junegunn Choi bb70923cd8 Fix flaky test cases 8 years ago
Junegunn Choi 85ef3263fc Fix incorrect cache reference in --exact mode (#547)
When we prepend a single quote to our query in --exact mode, we are not
supposed to limit the scope of the new search to the previous
exact-match result.
8 years ago
Junegunn Choi 2f6d23b91e Enhanced ranking algorithm
Based on the patch by Matt Westcott (@mjwestcott).
But with a more conservative approach:
- Does not use linearly increasing penalties; It is agreed upon that we
  should prefer matching characters at the beginnings of the words, but
  it's not always clear that the relevance is inversely proportional to
  the distance from the beginning.
- The approach here is more conservative in that the bonus is never
  large enough to override the matchlen, so it can be thought of as the
  first implicit tiebreak criterion.
- One may argue the change breaks the contract of --tiebreak, but the
  judgement depends on the definition of "tie".
8 years ago
Junegunn Choi 5f63a7b587 Fix flaky test case 8 years ago
Junegunn Choi 444a67cafa Fix flaky test cases 8 years ago
Junegunn Choi 6cf54833f7 Fix flaky test case 8 years ago
Junegunn Choi 2ccdf21a1f Add --hscroll-off=COL option
Close #513
8 years ago
Junegunn Choi a568120e42 Fix #494 - _fzf_complete hangs on zsh when not using tmux pane 8 years ago
Junegunn Choi 30bd0b53db Fix #481 - Use $SHELL instead of sh in execute action
Note that $SHELL only points to the default shell instead of the current
shell. If you're on a non-default shell, you might want to override the
value like follows.

  SHELL=zsh fzf --bind 'enter:execute:echo $ZSH_VERSION; sleep 1'
8 years ago
Junegunn Choi 96176476f3 Make fuzzy completion customizable with _fzf_compgen_{path,dir}
Notes:
- You can now override _fzf_compgen_path and _fzf_compgen_dir functions
  to use custom commands such as ag instead of find for listing
  completion candidates.
    - The first argument is the base path to start traversal
- Removed file-only completion in bash, i.e. _fzf_file_completion.
  Maintaining a list of commands that only expect files, not
  directories, is cumbersome (there are too many) and error-prone.

TBD:
- Added $FZF_COMPLETION_DIR_COMMANDS to customize the list of commands
  which use directory-only completion. The default is "cd pushd rmdir".
  Not sure if it's the best approach to address the requirement, I'll
  leave it as an undocumented feature.

Related: #406 (@thomcom), #456 (@frizinak)
8 years ago
Junegunn Choi 45143f9541 Ignore leading whitespaces when calculating 'begin' index 8 years ago
Junegunn Choi edb647667e Change temporary file names to fix flaky tests 8 years ago
Junegunn Choi 1d2d32c847 Accept comma-separated list of sort criteria 8 years ago
Junegunn Choi 0f281ef894 [vim] Try to make 'dir' option compatible with &autochdir
When 'dir' option is passed to fzf#run(), the current working directory
is temporarily changed to the given directory, and restored at the end.
However, this behavior is not compatible with &autochdir. This commit
introduces a heuristic to determine whether or not to restore the
previous working directory.

Related: https://github.com/junegunn/fzf.vim/issues/70
8 years ago
Junegunn Choi 661d06c90a Add regression test case for #458 9 years ago
Junegunn Choi e1dd798482 [bash/zsh-completion] List hidden files as well
Close #456 and #457
9 years ago
Junegunn Choi a1b60b1d42 Fix Travis CI build
The size of pseudo-terminal in Travis CI environment can be small
9 years ago
Junegunn Choi 99ea1056ac Add --tabstop option
Related: https://github.com/junegunn/fzf.vim/issues/49
9 years ago
Junegunn Choi 7bcf4effa5 Fix test failure - use absolute path 9 years ago
Junegunn Choi 31278bcc68 Fix compatibility issues with OR operator and inverse terms 9 years ago
Junegunn Choi a89d8995c3 Add execute-multi action
Close #413
9 years ago
Junegunn Choi e99731ea85 [shell] Add FZF_ALT_C_COMMAND for ALT-C (#408) 9 years ago
Junegunn Choi 81a88693c1 Make --extended default
Close #400
9 years ago
Junegunn Choi 92a75c9563 Use trimmed length when --nth is used with --tiebreak=length
This change improves sort ordering for aligned tabular input.
Given the following input:

    apple   juice   100
    apple   pie     200

fzf --nth=2 will now prefer the one with pie. Before this change fzf
compared "juice   " and "pie     ", both of which have the same length.
9 years ago
Junegunn Choi 2022a3ad96 Replace --header-file with --header (#346)
and allow using --header and --header-lines at the same time.

Close #346.
9 years ago
Junegunn Choi 65d9d416b4 Change exit status (0: OK, 1: No match, 2: Error/Interrupted)
A la grep. Close #345
9 years ago
Junegunn Choi 64443221aa Fix #344 - Backward scan when `--tiebreak=end` 9 years ago
Junegunn Choi 90b0cd44ac Should not strip ANSI codes when --ansi is not set 9 years ago
Junegunn Choi 80ed02e72e Add failing test case for #329 9 years ago
Junegunn Choi dea60b11bc Only consider the lengths of the relevant parts when --nth is set 9 years ago
Junegunn Choi 02bd2d2adf Do not proceed if $TERM is invalid
Related #305
9 years ago
Junegunn Choi ee0c8a2635 Add --margin option
Close #299
9 years ago
Junegunn Choi fdbf3d3fec Replace eof action with cancel (#289) 9 years ago
Junegunn Choi cc0d5539ba Add "eof" action which closes the finder only when input is empty
Close #289
9 years ago
Junegunn Choi 4e0e03403e Fix --header-lines unaffected by --with-nth 9 years ago
Junegunn Choi 928fccc15b Fix header not shown when the lines go beyond the screen limit 9 years ago
Junegunn Choi f71ea5f3ea Add test cases for header and fix corner cases 9 years ago
Junegunn Choi b0f491d3c3 Fix travis CI build
- Fix test failures on new fish 2.2.0
- Make timeout-based test cases more robust
9 years ago
Junegunn Choi 938151a834 [shell] Add FZF_CTRL_T_COMMAND for CTRL-T
Close #40
9 years ago
Junegunn Choi 8270f7f0ca Rename --null to --read0 and undocument the option
`--null` is ambiguous. For completeness' sake, we need both `--read0`
and `--print0`.

`--read0` only makes sense when the input contains multiline entries.
However, fzf currently cannot correctly display multiline entries,
I'm going to make `--read0` an undocumented feature.
9 years ago
Junegunn Choi 3492c8b780 Rename --history-max to --history-size
Considering HISTSIZE and HISTFILESIZE of bash
9 years ago
Junegunn Choi b504c6eb39 Avoid intermittent test failures
by making sure that we're back on shell command-line
9 years ago
Junegunn Choi fe4e452d68 Add --cycle option for cyclic scrolling
Close #266
9 years ago
Junegunn Choi 8677dbded1 Change alternative notation for execute action (#265)
e.g. fzf --bind "ctrl-m:execute:COMMAND..." --bind ctrl-j:accept
9 years ago
Junegunn Choi e287bd7f04 Fix Travis CI build 9 years ago
Junegunn Choi 6c99cc1700 Add bind action for executing arbitrary command (#265)
e.g. fzf --bind "ctrl-m:execute(less {})"
     fzf --bind "ctrl-t:execute[tmux new-window -d 'vim {}']"
9 years ago
Junegunn Choi 77048f3e3b Fix Travis CI build 9 years ago
Junegunn Choi 8b618f7439 Test refactoring 9 years ago
Junegunn Choi 8973207bb4 Fix Travis CI build 9 years ago
Junegunn Choi 3b52811796 Add support for search history
- Add `--history` option (e.g. fzf --history ~/.fzf.history)
- Add `--history-max` option for limiting the size of the file (default 1000)
- Add `previous-history` and `next-history` actions for `--bind`
    - CTRL-P and CTRL-N are automatically remapped to these actions when
      `--history` is used

Closes #249, #251
9 years ago
Junegunn Choi eaa3c67a5e Add actions for --bind: select-all / deselect-all / toggle-all
Close #257
9 years ago
Junegunn Choi 45a3655eaf Add test case for --null option 9 years ago
Junegunn Choi b00bcf506e Fix #248 - Premature termination of Reader on long input 9 years ago
Junegunn Choi 8f99f8fcc6 More test cases for --bind 9 years ago
Junegunn Choi 1592bedbe8 Custom key binding support (#238) 9 years ago
Junegunn Choi c511b45ff6 Minor tweak in test case
It may take long for find command to spot the temporary file created on
the home directory
9 years ago
Junegunn Choi 26d2af5ee8 [zsh-completion] Respect backslash-escaped spaces (#230) 9 years ago
Junegunn Choi 732f133940 [test] Make sure to kill background process 9 years ago
Junegunn Choi 5dc4df9570 Fix test cases 9 years ago
Junegunn Choi 683abb86ef Dump screen content on test failure 9 years ago
Junegunn Choi 207aa07891 [zsh-completion] Temporarily set nonomatch (#230)
No error on ~INVALID_USERNAME**<TAB>
9 years ago
Junegunn Choi 26a141c6a6 [zsh-completion] Fix `~USERNAME**` (#230) 9 years ago
Junegunn Choi dc64568c83 [zsh-completion] Completion for unknown commands 9 years ago
Junegunn Choi f4a595eedd Fix Travis CI build 9 years ago
Junegunn Choi 2b8e445321 Fuzzy completion for zsh (#227) 9 years ago
Junegunn Choi 4b7c571575 Fix race condition in test case 9 years ago
Junegunn Choi 5502b68a1d Test refactoring 9 years ago
Junegunn Choi 5794fd42df Fix test code 9 years ago
Junegunn Choi edb5ab5622 Update test cases for #203 9 years ago
Junegunn Choi e82eb27787 Smart-case for each term in extended-search mode
Close #208
9 years ago
Junegunn Choi 3f0e6a5806 Fix #209 - Invalid mutation of input on case conversion 9 years ago
Junegunn Choi cc67d2e1cf Test case for visual indicator of --toggle sort (#194) 9 years ago
Junegunn Choi b8904a8c3e Add --tiebreak option for customizing sort criteria
Close #191
9 years ago
Junegunn Choi b882de87ab Fix Travis CI build 9 years ago
Junegunn Choi 3a9d1df026 Fix unicode test case 9 years ago
Junegunn Choi 5c25984ea0 Fix Unicode case handling (#186) 9 years ago
Junegunn Choi 91fc6c984b Fix fuzzy completion test 9 years ago
Junegunn Choi 68503d32df [vim] Code cleanup 9 years ago
Junegunn Choi 50292adacb Implement --toggle-sort option (#173) 9 years ago
Junegunn Choi 84a7499ae3 Fix #172 - Print empty line when fzf with expect finished by -1 or -0 9 years ago
Junegunn Choi 2a167aa030 Implement --expect option to support simple key bindings (#163) 9 years ago
Junegunn Choi 9cfecf7f0b Fix test failure 9 years ago
Junegunn Choi c4d59aeec4 Remove legacy test code 9 years ago
Junegunn Choi 87c71a3ea6 Increase timeout in test cases 9 years ago
Junegunn Choi 55828f389a Add test case for 7e2c18a 9 years ago
Junegunn Choi 79c147ed78 Fix #135 - Directory completion to append / 9 years ago
Junegunn Choi 4d2d18649c Add basic test cases for shell extensions (#83)
- Key bindings for bash, zsh, and fish
- Fuzzy completion for bash (file, dir, process)
9 years ago
Junegunn Choi c1aa5c5f33 Add --tac option and reverse display order of --no-sort
DISCLAIMER: This is a backward incompatible change
9 years ago
Junegunn Choi b9b1eeffce Update Vader tests 9 years ago
Junegunn Choi 5667667d1f Add test case for --sync option 9 years ago
Junegunn Choi f5b034095a Fix race condition in asynchronous -1 and -0 9 years ago
Junegunn Choi e6a0de4094 Fix Travis CI build 9 years ago
Junegunn Choi 448132c46c Fix error when --query contains wide-length characters 9 years ago
Junegunn Choi 1476fc7f3b Refactor test code 9 years ago
Junegunn Choi 4dcc0f10b8 Fix Travis CI build by ignoring trailing empty lines
😭
9 years ago
Junegunn Choi 3d39ab5ded Fix flaky tests 9 years ago
Junegunn Choi c3a198d0c7 Add test cases for --select-1 and --exit-0 9 years ago
Junegunn Choi be5c17612a Add basic test case for --reverse 9 years ago
Junegunn Choi 4c3ae847b6 Add test case for --with-nth + --multi 9 years ago
Junegunn Choi 5c0dc79ffa Print selected items in the order they are selected 9 years ago
Junegunn Choi c0b432f7b4 Fix Travis-CI build 9 years ago
Junegunn Choi ae3180f919 Fix CTRL-Y key binding
With tmux-based test cases
9 years ago
Junegunn Choi ec040d82dd Improve word motions: ALT-B, ALT-F, ALT-D, ALT-BS (#112) 10 years ago
Junegunn Choi 00190677d4 Add support for ALT-D and ALT-BS key bindings
https://github.com/junegunn/fzf/issues/111#issuecomment-67832143
10 years ago
Junegunn Choi 7571baadb4 Fix test failure on Ruby 1.8.7
Hashes are unordered on Ruby 1.8
10 years ago
Junegunn Choi da03a66e69 Add test cases for --with-nth option 10 years ago
Junegunn Choi db37e67575 Skip failing tests on Ruby 1.8 10 years ago
Junegunn Choi 76a3ef8c37 Add --with-nth option (#102) 10 years ago
Junegunn Choi 2924fd3e23 Add regression test case for #91 10 years ago
Junegunn Choi 4d72bd098a Add --print-query option (#70) 10 years ago
Junegunn Choi 502973ff75 Add --prompt option (#70) 10 years ago
Junegunn Choi 72ec0a3408 Add test cases for result scroll 10 years ago
Junegunn Choi e392da20e8 Make scrollable (#68) 10 years ago
Junegunn Choi f8e357fa19 Extend --nth option to take ranges
As discussed in #55
10 years ago
Junegunn Choi edcd7c6aa6 Remove UTF-8 NFD conversion
We have iconv.
10 years ago
Junegunn Choi f6b1a6278f Add --reverse option (top-to-bottom layout) 10 years ago
Junegunn Choi 0eafa725b9 Fix test code indentation 10 years ago
Junegunn Choi fa212efe5f Fix ranking when multiple regions overlap
e.g.
  Match region #1: [-----------]
  Match region #2:       [---]
  Match region #3:         [------]
10 years ago
Junegunn Choi 02c01c81a0 Improve -0 and -1 as suggested in #36
- Make -0 and -1 work without -q
- Change exit status to 0 when exiting with -0
10 years ago
Junegunn Choi 22d3929ae3 Implement --select-1 and --exit-0 (#27, #36) 10 years ago
Junegunn Choi ab9fbf1967 Allow --nth option to take multiple indexes (comma-separated) 10 years ago
Junegunn Choi ec4b8a59fa Implement --nth and --delimiter option 10 years ago
Junegunn Choi e7439ce193 Major update to Vim plugin 10 years ago
Junegunn Choi 9904f5354e Add --black for terminals incapable of use_default_colors
See the discussion in #18.

Use --black option to use black background regardless of the default
background color of the terminal. Also, this option can be used to fix
rendering issues on terminals that don't support use_default_colors (man
3 default_colors). Depending on the terminal, use_default_colors may or
may not succeed, but the Ruby version of it always returns nil, it's
currently not possible to automatically enable this option.
10 years ago
Junegunn Choi 457a240457 Add option to disable 256-color output (related #18) 10 years ago
Junegunn Choi dcb4694ec1 Reimplement mouse input without using Curses.getch 10 years ago
Junegunn Choi 2fb8ae010f Completely remove mouse support
Since the version 0.7.0, fzf internally used Curses.getch() call to take user
input, which allowed it to support mouse input as well. However it has turned
out that Curses.getch() has introduced glitches that cannot be easily handled
(e.g. Try resize the terminal). So I finally decided that it's not worth the
trouble and drop the mouse support.
10 years ago
Junegunn Choi 2dbca00bfb Implement --extended-exact option (#24) 10 years ago
Junegunn Choi 301290663d Add -f (--filter) option (#15)
This commit adds --filter option so that fzf can be used as a simple unix
filter instead of being an interactive fuzzy finder.
10 years ago
Junegunn Choi c7e86ad4f1 Add --no-mouse option to replace FZF_MOUSE_ENABLED 10 years ago
Junegunn Choi 3723829b0a Add FZF_DEFAULT_OPTS and update command-line options 10 years ago
Junegunn Choi 159dd7f069 Implement smart-case match (#12) 11 years ago
Junegunn Choi cb3645ea95 Fix `^.*$` pattern matching in extended-search mode (#9) 11 years ago
Junegunn Choi c4dec4d34b Add -q option (initial query) 11 years ago
Junegunn Choi 423e26b0c9 Better handling of NFD chars 11 years ago
Junegunn Choi 6a5e1de6f3 Fix missing NFD conversion in extended-search mode 11 years ago
Junegunn Choi be3b948034 Fix Gem executable 11 years ago
Junegunn Choi f0b2b98c5d Increase FZF_DEFAULT_SORT to 1000 11 years ago
Junegunn Choi e4a49dbb2a Add exact-match and invert-exact-match match types 11 years ago
Junegunn Choi 6037e1e217 Ignore invalid UTF-8 sequences 11 years ago
Junegunn Choi 43acf5c8a4 Extended mode
- Implement prefix caching of extended mode
- Improved ranking algorithm for extended mode
- Fix nfc conversion bug
11 years ago
Junegunn Choi 90ad6d50b8 Refactoring for test 11 years ago