summaryrefslogtreecommitdiff
path: root/shell/completion.bash
diff options
context:
space:
mode:
authorThomas Martitz <thomas.martitz@mailbox.org>2024-10-15 11:00:27 +0200
committerGitHub <noreply@github.com>2024-10-15 18:00:27 +0900
commit97f1dae2d1d95c4a499a844cf781de77a2eafa73 (patch)
tree897666e120a8d39946e7079dc3a1b10696aead3a /shell/completion.bash
parente54ec05709cf18fd0f76b885f6ae7f5f3a1095ad (diff)
downloadfzf-97f1dae2d1d95c4a499a844cf781de77a2eafa73.tar.gz
Use eval to evaluate $post variable as command. (#4023)
Diffstat (limited to 'shell/completion.bash')
-rw-r--r--shell/completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index 5eebdef5..afdb9476 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -377,7 +377,7 @@ _fzf_complete() {
selected=$(
FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse" "${FZF_COMPLETION_OPTS-} $str_arg") \
FZF_DEFAULT_OPTS_FILE='' \
- __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | command tr '\n' ' ')
+ __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | eval "$post" | command tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
if [[ -n "$selected" ]]; then
COMPREPLY=("$selected")