ports/textproc/fzf/files/patch-shell_completion.zsh
Danilo G. Baio 6efa075ccc textproc/fzf: Fix patches
The patches for this port got mangled in the last update.

This patch corrects that so the completion for kill(1) works again
if one is using the example shell completion files.

PR:		226654
Submitted by:	Sascha Holzleiter <sascha@root-login.org> (maintainer)
2018-03-17 12:15:31 +00:00

11 lines
828 B
Bash

--- shell/completion.zsh.orig 2017-12-03 14:55:24 UTC
+++ shell/completion.zsh
@@ -163,7 +163,7 @@ fzf-completion() {
# Kill completion (do not require trigger sequence)
if [ $cmd = kill -a ${LBUFFER[-1]} = ' ' ]; then
fzf="$(__fzfcmd_complete)"
- matches=$(command ps -ef | sed 1d | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" ${=fzf} -m | awk '{print $2}' | tr '\n' ' ')
+ matches=$(ps -uef | sed 1d | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" ${=fzf} -m | awk '{print $2}' | tr '\n' ' ')
if [ -n "$matches" ]; then
LBUFFER="$LBUFFER$matches"
fi