Skip to content

Commit

Permalink
make: Use only posix basic regexps with sed (Alioth: #314345)
Browse files Browse the repository at this point in the history
  • Loading branch information
GArik committed Aug 13, 2013
1 parent 62e0c3b commit f230cfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions completions/make
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ function _make_target_extract_script()
/^$/ { # end of target block
x # unhold target
/^$/d # dont print blanks
s,^(.{${dirname_len}})(.{${#basename}}[^:/]*/?)[^:]*:.*$,${output},p
s|^\(.\{${dirname_len}\}\)\(.\{${#basename}\}[^:/]*/\{0,1\}\)[^:]*:.*$|${output}|p
d # hide any bugs
}
/^[^#\t:%]+:/ { # found target block
/^[^#\t:%]\{1,\}:/ { # found target block
/^\.PHONY:/ d # special target
/^\.SUFFIXES:/ d # special target
Expand Down Expand Up @@ -144,7 +144,7 @@ _make()
local reset=$( set +o | grep -F posix ); set +o posix # for <(...)
COMPREPLY=( $( LC_ALL=C \
make -npq "${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \
sed -nrf <(_make_target_extract_script $mode "$cur") ) )
sed -nf <(_make_target_extract_script $mode "$cur") ) )
$reset

if [[ $mode != -d ]]; then
Expand Down

0 comments on commit f230cfd

Please sign in to comment.