Commit Graph

814 Commits (1da065e50e2b1270bec1f62f46daf6e84e9ca991)
 

Author SHA1 Message Date
Junegunn Choi 1da065e50e 0.10.7 9 years ago
Junegunn Choi 86bc9d506f Fix invalid interrupt handler during execute action
Interrupt handling during execute action was not serialized and often
caused crash, failed to restore the terminal state.
9 years ago
Junegunn Choi eee45a9578 [completion] Revamp completion API
* _fzf_complete is the helper function for custom completion
    * _fzf_complete FZF_OPTS ARGS
    * Reads the output of the source command instead of the command string
    * In zsh, you can use pipe to feed the data into the function, but
      it's not possible in bash as by doing so COMPREPLY is set from the
      subshell and thus nullified
* Change the naming convention for consistency:
    * _fzf_complete_COMMAND

e.g.

  # pass completion suggested by @d4ndo (#362)
  _fzf_complete_pass() {
    _fzf_complete '+m' "$@" < <(
      local pwdir=${PASSWORD_STORE_DIR-~/.password-store/}
      local stringsize="${#pwdir}"
      find "$pwdir" -name "*.gpg" -print |
          cut -c "$((stringsize + 1))"-  |
          sed -e 's/\(.*\)\.gpg/\1/'
    )
  }

  # Only in bash
  complete -F _fzf_complete_pass -o default -o bashdefault pass
9 years ago
Junegunn Choi 659f49a09a [fzf-tmux] Create temp files in $TMPDIR if defined 9 years ago
Junegunn Choi 8fa9e85980 [zsh-completion] Allow custom completion function
While in bash you can externally register custom completion functions
using `complete` command, it was not possible to do so in zsh without
changing completion.zsh as the name of the supported commands are
hard-coded within the code (See #362). With this commit, fzf-completion
of zsh will first look if `_fzf_COMMAND_completion` exists and calls the
function, so one can externally define completion functions for specific
commands.

This commit also tries to make the interface of (yet undocumented)
_fzf_list_completion helper function consistent across bash and zsh.

So the following code works both on bash and zsh.

    _fzf_pass_completion() {
      local pwdir=${PASSWORD_STORE_DIR-~/.password-store/}
      local stringsize="${#pwdir}"
      let "stringsize+=1"
      _fzf_list_completion '+m' "$@" << "EOF"
        find "$pwdir" -name "*.gpg" -print | cut -c "$stringsize"- | sed -e 's/\(.*\)\.gpg/\1/'
    EOF
    }

    # Only on bash
    complete -F _fzf_pass_completion -o default -o bashdefault pass

Note that the suggested convention and the interface are not yet final
and subject to change.

/cc @d4ndo
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 7c7a30c472 Merge pull request #364 from halostatue/use-zsh-regex-module
Remove dependency on zsh/pcre module
9 years ago
Austin Ziegler ea271cd4e2 Remove dependency on zsh/pcre module
Fixes #363.
9 years ago
Junegunn Choi 6a38d07a4c Merge pull request #361 from justinmk/swapexists
[vim] handle SwapExists
9 years ago
Justin M. Keyes c4e5ee63bb [vim] handle SwapExists
The SwapExists dialog prevents multiple files from being opening if the
dialog occurs before all files are opened. Opening the files is more
important than showing the dialog, so choose "readonly" automatically
and continue opening files.
9 years ago
Junegunn Choi 862da2c0b1 [vim] Consistent exit status handling 9 years ago
Junegunn Choi 545370d2b3 Merge branch 'jebaum-master' 9 years ago
James Baumgarten 59220c63a6 [vim] handle exit status 1 properly (#359) 9 years ago
Junegunn Choi 86306dd45a [vim] Display proper error message when GVim launcher failed
Related: https://github.com/junegunn/fzf.vim/issues/16
9 years ago
Junegunn Choi 98d2bfa0db [install] Terminate install script when failed to update shell config
Close #354
9 years ago
Junegunn Choi aec48f159b [neovim] Remove redraw! hack that is no longer needed 9 years ago
Junegunn Choi ad7e433a7d Use build tags to enable static linking 9 years ago
Junegunn Choi 5a60aa5050 [vim] Display proper error message when command failed 9 years ago
Junegunn Choi ebea470875 Build linux binary on Centos 9 years ago
Junegunn Choi d980e00961 Revert "Revert "0.10.6""
This reverts commit 987799f8fb.
9 years ago
Junegunn Choi 987799f8fb Revert "0.10.6"
This reverts commit d2f3604c1d.
9 years ago
Junegunn Choi d2f3604c1d 0.10.6 9 years ago
Junegunn Choi 72cc558fdc Fix travis CI build 9 years ago
Junegunn Choi 6bc3fe6e67 Build partially-static binary for linux (#350)
Instead of building a separate statically-linked binary, build
partially-static binary that only contains ncurses to avoid
compatibility issues in libc.
9 years ago
Junegunn Choi 9398878048 [fzf-tmux] Exit with the same exit status as with fzf 9 years ago
Junegunn Choi ca19762e58 Exit status 130 when fzf is terminated by the user
Related: #345
9 years ago
Junegunn Choi 8764be07e2 [vim] Ignore exit status of 2 (#345) 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 fa2f9f1f21 Remove flattr badge 9 years ago
Junegunn Choi c656cfbdce Update doc 9 years ago
Junegunn Choi de829c0938 0.10.5 9 years ago
Junegunn Choi 64443221aa Fix #344 - Backward scan when `--tiebreak=end` 9 years ago
Junegunn Choi 9017e29741 Make it possible to unquote the term in extended-exact mode
Close #338
9 years ago
Junegunn Choi 0a22142d88 [fzf-tmux] Fix #343 - Escape backticks in --query 9 years ago
Junegunn Choi ac160f98a8 [gvim] Fix #342 - Should not escape launcher part of the command 9 years ago
Junegunn Choi 62e01a2a62 [vim] Escape newline character when running fzf with :!
Fixes Helptags! command from fzf.vim
9 years ago
Junegunn Choi 5660cebaf6 [zsh-completion] Temporarily unset shwordsplit (#328) 9 years ago
Junegunn Choi a7e588ceac Merge pull request #336 from fazibear/fix-fish-streams
Fix CTRL-T on fish to work asynchronously
9 years ago
Michał Kalbarczyk 5baf1c5536 fix fish streams 9 years ago
Junegunn Choi 9a2d9ad947 0.10.4 9 years ago
Junegunn Choi 90b0cd44ac Should not strip ANSI codes when --ansi is not set 9 years ago
Junegunn Choi 698e8008df [vim] Dynamic height specification for 'up' and 'down' options
Values for 'up' and 'down' can be written with ~ prefix. Only applies
when the source is a Vim list.

    e.g. { 'source': range(10), 'down': '~40%' }
9 years ago
Junegunn Choi 1de4cc3ba8 [install] Fall back statically-linked binary on 64-bit linux
Close #322
9 years ago
Junegunn Choi 0d66ad23c6 Fix build script 9 years ago
Junegunn Choi 7f7741099b make linux-static (#322) 9 years ago
Junegunn Choi 5a72dc6922 Fix #329 - Trim ANSI codes from output when --ansi & --with-nth are set 9 years ago
Junegunn Choi 80ed02e72e Add failing test case for #329 9 years ago
Junegunn Choi 8fb31e1b4d [vim] Escape % and # when running source command with :! 9 years ago
Junegunn Choi 148f21415a Mention fzf.vim project 9 years ago