Skip to content

Commit

Permalink
make: Pass script to sed as parameter instead of using process substi…
Browse files Browse the repository at this point in the history
…tution

Unsetting posix mode may reportedly interfere with keybindings (#190).
  • Loading branch information
scop committed Mar 11, 2018
1 parent e858751 commit 153d6d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions completions/make
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,11 @@ _make()
mode=-d # display-only mode
fi

local IFS=$' \t\n' reset=$( shopt -po posix ); set +o posix # <(...)
local IFS=$' \t\n' script=$( _make_target_extract_script $mode "$cur" )
COMPREPLY=( $( LC_ALL=C \
$1 -npq __BASH_MAKE_COMPLETION__=1 \
"${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \
command sed -nf <(_make_target_extract_script $mode "$cur") ) )
$reset
command sed -ne "$script" ) )

if [[ $mode != -d ]]; then
# Completion will occur if there is only one suggestion
Expand Down

0 comments on commit 153d6d4

Please sign in to comment.