Skip to content
Myr

Use eval to evaluate $post variable as command. (#4023)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Martitz · committed by GitHub · parent e54ec05 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:shell/completion.bash+1 added-1 removed
375 unmodified lines
376377 selected=$(378 FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse" "${FZF_COMPLETION_OPTS-} $str_arg") \379 FZF_DEFAULT_OPTS_FILE='' \380 __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | command tr '\n' ' ')380 __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | eval "$post" | command tr '\n' ' ')381 selected=${selected% } # Strip trailing space not to repeat "-o nospace"382 if [[ -n "$selected" ]]; then383 COMPREPLY=("$selected")384 else
215 unmodified lines