summaryrefslogtreecommitdiff
path: root/shell/completion.zsh
diff options
context:
space:
mode:
authorIgor Urazov <z0rc@users.noreply.github.com>2017-10-21 04:31:34 +0300
committerJunegunn Choi <junegunn.c@gmail.com>2017-10-21 10:31:34 +0900
commiteaf6eb897879becff31ea9b27046c0eff9e1e646 (patch)
tree26d0a5c1875e243954b726b95016ba3c43c2eefc /shell/completion.zsh
parent3af63bcf1f203c9716a3f69e1264b8877e528941 (diff)
downloadfzf-eaf6eb897879becff31ea9b27046c0eff9e1e646.tar.gz
[completion] Ensure ps called as command (#1098)
When `ps` is aliased for something uncommon, like `alias ps=grc ps` which colorizes ps output, the output of `ps` can be unexpected and/or undesired. This change makes ps to be always executed as command, even if it's aliased.
Diffstat (limited to 'shell/completion.zsh')
-rw-r--r--shell/completion.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh
index e2ed0b17..3c083aa4 100644
--- a/shell/completion.zsh
+++ b/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=$(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=$(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' ' ')
if [ -n "$matches" ]; then
LBUFFER="$LBUFFER$matches"
fi