summary refs log tree commit diff
path: root/Completion/User/_configure
blob: de8d5fba5ff3b521f7adeedd7f49b2e5185ea1e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#defcomp configure

if [[ $PREFIX = *=* ]]; then
  # Complete filenames after e.g. --prefix=
  IPREFIX=${PREFIX%%=*}=
  PREFIX=${PREFIX#*=}
  complist -f
else
  # Generate a list of options from configure --help
  complist -s '$($COMMAND --help |
  sed -n -e '\''s/^ *\(--[-a-z0-9]*\)[    =,].*$/\1/p'\'')'
fi