diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2020-03-07 16:26:53 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-03-07 16:26:53 +0900 |
| commit | baf882ace741e4d279b6a6d2da467e00f94642f5 (patch) | |
| tree | 26744d3d948918de01df871535653088aeae1abe /shell/completion.bash | |
| parent | ba82f0bef99299a2c8a7a9cacde55c28568c9c3b (diff) | |
| download | fzf-baf882ace741e4d279b6a6d2da467e00f94642f5.tar.gz | |
[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
Diffstat (limited to 'shell/completion.bash')
| -rw-r--r-- | shell/completion.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/completion.bash b/shell/completion.bash index b953cc8a..bd94c51a 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -200,7 +200,7 @@ _fzf_complete() { if [[ "$cur" == *"$trigger" ]]; then cur=${cur:0:${#cur}-${#trigger}} - selected=$(cat | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $1" __fzf_comprun "$2" -q "$cur" | $post | tr '\n' ' ') + selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $1" __fzf_comprun "$2" -q "$cur" | $post | tr '\n' ' ') selected=${selected% } # Strip trailing space not to repeat "-o nospace" if [ -n "$selected" ]; then COMPREPLY=("$selected") |
