err, getopt is not technically bash, it's an external. And yes it can handle long options but it's older and deprecated in favour of the getopts internal builtin.
it looks to me like you're still parsing it manually.
thanks for the tip, I will try this out.
since I'm just writing a wrapper to stop a couple flags going through to a command, I've done a quick and nice looking thing.
Code:
params="$@"
until [ -z $1 ]
do
if [ "$1" == "-d" ]
then
echo "you are not allowed to use the -d switch... blah blah" >&2
exit 1
fi
etc
shift
done
command "$params"