/usr/share/bash-completion/completions
Edit: /usr/share/bash-completion/completions/make (6184B)
# bash completion for GNU make -*- shell-script -*-
_make_target_extract_script()
{
local mode="$1"
shift
local prefix="$1"
local prefix_pat=$(command sed 's/[][\,.*^$(){}?+|/]/\\&/g' <<<"$prefix")
local basename=${prefix##*/}
local dirname_len=$((${#prefix} - ${#basename}))
if [[ $mode == -d ]]; then
# display mode, only output current path component to the next slash
local output="\2"
else
# completion mode, output full path to the next slash
local output="\1\2"
fi
cat <
/dev/null |
command sed -ne "$script"))
if [[ $mode != -d ]]; then
# Completion will occur if there is only one suggestion
# so set options for completion based on the first one
[[ ${COMPREPLY-} == */ ]] && compopt -o nospace
fi
fi
} &&
complete -F _make make gmake gnumake pmake colormake bmake
# ex: filetype=sh