summaryrefslogtreecommitdiff
path: root/contrib/gnatmake
diff options
context:
space:
mode:
authorDavid Paleino <d.paleino@gmail.com>2009-10-10 17:15:58 +0200
committerDavid Paleino <d.paleino@gmail.com>2009-10-10 17:15:58 +0200
commite5a9b6220e93ca656fd9774c6aefa78241edca6f (patch)
tree4a65aa19b18fe2e8dcec24a1c97ce9746a6f91ff /contrib/gnatmake
parent96d00c3d7f1912d4f3f76f8ea21ef68d179b8b30 (diff)
downloadbash-completion-upstream/1.1.tar.gz
Imported Upstream version 1.1upstream/1.1
Diffstat (limited to 'contrib/gnatmake')
-rw-r--r--contrib/gnatmake57
1 files changed, 31 insertions, 26 deletions
diff --git a/contrib/gnatmake b/contrib/gnatmake
index e4d4e41f..3b66aa31 100644
--- a/contrib/gnatmake
+++ b/contrib/gnatmake
@@ -1,32 +1,37 @@
-# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
-# ex: ts=8 sw=8 noet filetype=sh
-#
# Gnatmake completion by Ralf_Schroth@t-online.de (Ralf Schroth)
+have gnatmake &&
_gnatmake()
{
- local cur
+ local cur
- COMPREPLY=()
- cur=`_get_cword`
+ COMPREPLY=()
+ cur=`_get_cword`
- if [[ "$cur" == -* ]]; then
- # relevant (and less relevant ;-) )options completion
- COMPREPLY=( $( compgen -W '-a -c -f -i -j -k -m -M -n -o \
- -q -s -v -z -aL -A -aO -aI -I -I- -L -nostdinc \
- -nostdlib -cargs -bargs -largs -fstack-check \
- -fno-inline -g -O1 -O0 -O2 -O3 -gnata -gnatA \
- -gnatb -gnatc -gnatd -gnatD -gnate -gnatE \
- -gnatf -gnatF -gnatg -gnatG -gnath -gnati \
- -gnatk -gnatl -gnatL -gnatm -gnatn -gnato \
- -gnatO -gnatp -gnatP -gnatq -gnatR -gnats \
- -gnatt -gnatT -gnatu -gnatU -gnatv -gnatws \
- -gnatwe -gnatwl -gnatwu -gnatW -gnatx -gnatX \
- -gnaty -gnatz -gnatZ -gnat83' -- $cur ) )
- else
- # source file completion
- _filedir '@(adb|ads)'
-
- fi
-}
-complete -F _gnatmake -o filenames gnatmake
+ if [[ "$cur" == -* ]]; then
+ # relevant (and less relevant ;-) )options completion
+ COMPREPLY=( $( compgen -W '-a -c -f -i -j -k -m -M -n -o \
+ -q -s -v -z -aL -A -aO -aI -I -I- -L -nostdinc \
+ -nostdlib -cargs -bargs -largs -fstack-check \
+ -fno-inline -g -O1 -O0 -O2 -O3 -gnata -gnatA \
+ -gnatb -gnatc -gnatd -gnatD -gnate -gnatE \
+ -gnatf -gnatF -gnatg -gnatG -gnath -gnati \
+ -gnatk -gnatl -gnatL -gnatm -gnatn -gnato \
+ -gnatO -gnatp -gnatP -gnatq -gnatR -gnats \
+ -gnatt -gnatT -gnatu -gnatU -gnatv -gnatws \
+ -gnatwe -gnatwl -gnatwu -gnatW -gnatx -gnatX \
+ -gnaty -gnatz -gnatZ -gnat83' -- "$cur" ) )
+ else
+ # source file completion
+ _filedir '@(adb|ads)'
+ fi
+} &&
+complete -F _gnatmake $filenames gnatmake
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh