Commit Graph

137 Commits (1b1bc9ea36d76a8b0b84ee66c02b59097bb834be)

Author SHA1 Message Date
Josh Pencheon 45d4c57d91 [completion] Include host aliases in ssh completion (#1062) 7 years ago
Junegunn Choi 9d2c6a95f4
Revert "[bash] Do not append space when path completion is cancelled"
This reverts commit 376a76d1d3 as it
affects normal completion
7 years ago
Junegunn Choi 376a76d1d3
[bash] Do not append space when path completion is cancelled
Close #990
7 years ago
Tom Fitzhenry 7b5ccc45bc [fish] Fix ctrl-r regression in versions <2.4 (#972)
Close #966
7 years ago
John Nguyen 70cfa6af13 [fish] Accept starting dir for <M-c> key binding (#944)
This also modifies <C-t> behaviour.
The longest file path in the input is used as root directory for `find`
command. The remainder of the input is passed to fzf's --query as a
initial search parameters.
7 years ago
Tom Fitzhenry dbcaec59ae [fish] Support multiline commands (#954)
Fix found by @amosbird at https://github.com/junegunn/fzf/issues/953#issuecomment-310309055

closes #440
7 years ago
John Nguyen 1a68698d76 [fish] Fix <C-t> completion for current dir search (#946)
If "." is given as the argument to begin <C-t> completion, the leading
"." is not correctly removed. In general, if user selects a fzf
completion, the current token should be "consumed".
7 years ago
Junegunn Choi 842a73357c
[fish] Fix CTRL-T with paths that don't start with ./
Close #943
7 years ago
Junegunn Choi a5862d4b9c
[bash-completion] Use -o dirnames instead of -o plusdirs
Close #903
Related #135
7 years ago
Sam Van Den Berge 2ba10071c9 Add support for IPv6 addresses in ssh completion (#877)
Signed-off-by: Sam Van Den Berge <sam@drgt.net>
7 years ago
Junegunn Choi 337cdbb37c
[zsh] Use setopt noposixbuiltins instead of emulate -L zsh
Close #858
3a6af27586 (commitcomment-21135641)
7 years ago
Junegunn Choi 05fdf91fc5
Revert "[zsh] emulate -L zsh to avoid issues with incompatible options"
This reverts commit 3a6af27586.
7 years ago
Junegunn Choi c387689d1c
[shell] Enable sorting by default in CTRL-R
CTRL-R binding used to start with --no-sort to list the matched commands
in chronological order. However, it has been a constant source of
confusion. Let's enable it by default from now on. The sorted result
shouldn't be too confusing as we use --tiebreak=index.
7 years ago
Junegunn Choi 3a6af27586
[zsh] emulate -L zsh to avoid issues with incompatible options
Close #858
7 years ago
Junegunn Choi 11407bf656
Exclude sysfs in find commands 7 years ago
Pierre Neidhardt ce43ea9f42 [shell] Replace `sed` with `-mindepth 1` and `cut` (#844) 7 years ago
Daniel Gray afa25d8c57 [zsh] Do not cd when cancelling alt+c keybind (#840) 8 years ago
Junegunn Choi 95c77bfb98
Use --bind instead of --toggle-sort
Related #822
8 years ago
Junegunn Choi dbddee9de9
[fish] Add toggle-sort back to CTRL-R (#759) 8 years ago
Junegunn Choi d09ad13208
[zsh] Workaround trailing esacped space bug in go-shellwords
https://github.com/mattn/go-shellwords/issues/3

Close #812
8 years ago
Junegunn Choi 8ac37d5927
[shell] Do not override --reverse in CTRL-R
Close #807
8 years ago
Junegunn Choi 7ef0e50507
[bash/zsh] Remove unused --reverse in CTRL-R binding
Related #807
8 years ago
Junegunn Choi 44d3faa048
[completion] Restore --height option for kill completion 8 years ago
Junegunn Choi 208d4f2173
[shell] Make layout configurable via $FZF_DEFAULT_OPTS and $FZF_{KEY}_OPTS 8 years ago
Junegunn Choi dc3957ce79
[completion] Add preview window to kill completion 8 years ago
Junegunn Choi 4ecb7f3a16
Replace --normalize with --literal and enable normalization by default
Ref #790
8 years ago
Junegunn Choi 5b68027bee
Fix $FZF_COMPLETION_OPTS evaluation
Close #799
8 years ago
Junegunn Choi 1448d631a7
Add --height option 8 years ago
Junegunn Choi fd137a9e87
[bash/zsh-completion] Filter ~/.ssh/known_hosts
Close #791
8 years ago
Junegunn Choi 45faad7e04
[bash] Addendum fix for #580 8 years ago
Junegunn Choi 73eacf1137
[bash-completion] Always backup existing completion definitions
_fzf_completion_loaded is no longer checked. This change increases the
load time by a few milliseconds, but I can't think of a better way to
handle the issue.

Close #783.
8 years ago
Pierre Neidhardt c7b0764002 [shell] Use '-mindepth 1' to omit root folder in 'find' output (#779)
This removes the need for the 'sed' call. Faster, cleaner.
8 years ago
Pierre Neidhardt 0508e70f9b Overhaul fish functions (#759)
Replace the "temp file" workaround with the "read" function: it's
simpler and faster.

Use proper escaping, remove the custom function.

The "file" widget uses last token as root for the "find" command.
This replaces the equivalent of '**' completion in bash/zsh.
The "$dir" non-expanded variable can be used in FZF_CTRL_T_COMMAND to
set the root.
8 years ago
Junegunn Choi c49e65d926
[shell] Fix pruning condition of find command for CTRL-T and ALT-C
`-fstype dev` is invalid. It's devfs on macOS and devtmpfs on Linux.
8 years ago
Niraj Thapaliya d3da310b92 Use `command` to ignore shell function 8 years ago
Niraj Thapaliya 93e0a6a9de Gnu `[` evaluates both sides of a -o condition regardless
It doesn't short circuit like we expect, causing trouble when $dir is
empty

Use shell builtin instead
8 years ago
Pierre Neidhardt 2134c0c8a9 key-bindings.fish: Yank commandline in fzf-history-widget 8 years ago
Maverick Woo 2c8479a7c5 Fix #668
Handle uppercase letters in program names. This also deals with `-` and
`.`, both of which are quite common in program names, e.g., `xdg-open`
and `foo.sh`.
8 years ago
Tobias Frilling 639de4c27b Split default zsh binding at the correct place
The command substitution and following word splitting to determine the default
zle widget for ^I formerly only works if the IFS parameter contains a space. Now
it specifically splits at spaces, regardless of IFS.
8 years ago
Junegunn Choi 6a52f8b8dd
[zsh-completion] setopt localoptions noksh_arrays
Close #607
8 years ago
Junegunn Choi c36413fdf6
[zsh] Suppress error message when pipefail is not supported
Close #615
8 years ago
Junegunn Choi 3a4e053af7
[bash] Fall back to send-keys if named paste buffer is not supported
Related: #616
8 years ago
Sean b36b0a91f5 use tmux buffers for sending output to preserve character encoding 8 years ago
Junegunn Choi 6081eac58a
[shell] Suppress alias/function expansion
Close #611
8 years ago
Sebastian Reuße fed5e5d5af [zsh] Re-initialize zle when widgets finish
zle automatically calls zle-line-init when it starts to read a new line. Many
Zsh setups use this hook to set the terminal into application mode, since this
will then allow defining keybinds based on the $terminfo variable (the escape
codes in said variable are only valid in application mode).

However, fzf resets the terminal into raw mode, rendering $terminfo values
invalid once the widget has finished. Accordingly, keyboard bindings defined
via $terminfo won’t work anymore.

This fixes the issue by calling zle-line-init when widgets finish. Care is taken
to not call this widget when it is undefined.

Fixes #279
8 years ago
Daniel Hahler 38a2076b89 zsh: pass through exit code from widgets
This allows to have a custom widget like the following, which would
additionally accept the line, but only in case of entries being
selected:

    fzf-file-widget-with-accept() {
      zle fzf-file-widget
      if [[ "$?" == 0 ]] && (( $#BUFFER )); then
        zle accept-line
      fi
    }
    zle     -N   fzf-file-widget-with-accept
    bindkey '\e^T' fzf-file-widget-with-accept

With this `<C-a>t` will launch fzf, and simulate the pressing of "Enter"
afterwards.
8 years ago
Junegunn Choi c39c039e15
[shell] Add $FZF_CTRL_T_OPTS and $FZF_ALT_C_OPTS
Close #596
8 years ago
Aleks Kamko 19339e3a6d optimize fzf_default_completion binding 8 years ago
Junegunn Choi 95b34de339
[bash/zsh] Fix $FZF_CTRL_R_OPTS with option values with spaces 8 years ago
Junegunn Choi 923feb69ab
[zsh] Fix indentation 8 years ago