#!/bin/sh # # Generate the list of commands for the bash completion script IPA=./ipa commands="" for topic in `$IPA help | grep "^ " | awk '{ print $1 }'` do if [ "${topic}" != "help" -a "${topic}" != "console" ]; then c=`$IPA help $topic | grep "^ [a-zA-Z]" | awk '{ printf "%s ", $1 }'` commands="${commands} $c" fi done sed "s/COMMANDS/${commands}/" < ipa.sh.template > ipa.sh