Salome HOME
Add test for the compilation commands
[tools/sat.git] / complete_sat.sh
index c78ce059fd8332d859ae3874b8109a1b3eaa1a2e..c258f901d94f2950c91ed23fb08e3d3a6e366150 100755 (executable)
@@ -39,11 +39,11 @@ _show_applications()
     COMPREPLY=( $(compgen -W "${opts2}" -- ${cur}) )
 }
 
-_show_modules()
+_show_products()
 {
     if [[ $appli != $prev ]]
     then
-        opts=$(for x in `$SAT_PATH/sat -s config $appli -nv APPLICATION.modules`
+        opts=$(for x in `$SAT_PATH/sat -s config $appli -nv APPLICATION.products`
             do echo ${x}; done)
 
         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
@@ -80,7 +80,7 @@ _salomeTools_complete()
     # first argument => show available commands
     if [[ ${argc} == 1 ]]
     then
-        opts="config log testcommand source patch --help"
+        opts="config log testcommand source patch prepare environ clean configure make makeinstall compile --help"
         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
         return 0
     fi
@@ -113,13 +113,13 @@ _salomeTools_complete()
         return 0
     fi
       
-    # show list of modules
-    if [[ ${prev} == "--module" || ${prev} == "-m" ]]
+    # show list of products
+    if [[ ${prev} == "--product" || ${prev} == "-p" ]]
     then
         appli="${COMP_WORDS[2]}"
         if [[ ${command} != "source" ]]
         then
-            opts=$(for x in `$SAT_PATH/sat config $appli -nv APPLICATION.modules`
+            opts=$(for x in `$SAT_PATH/sat config $appli -nv APPLICATION.products`
                 do echo ${x}; done)
 
                COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
@@ -139,8 +139,48 @@ _salomeTools_complete()
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
+        clean)
+            opts="--products --sources --build --install --all --sources_without_dev"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
         source)
-            opts="--modules --no_sample --force"
+            opts="--products"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        patch)
+            opts="--products"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        prepare)
+            opts="--products --force --force_patch"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        environ)
+            opts="--products --shell --prefix --target"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        configure)
+            opts="--products --option"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        make)
+            opts="--products --option"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        makeinstall)
+            opts="--products"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        compile)
+            opts="--products --with_fathers --with_children --clean_all --make_flags --show --stop_first_fail"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
@@ -149,7 +189,7 @@ _salomeTools_complete()
     
 }
 
-# activation de l'auto-completion pour la commande sat
+# activation of auto-completion for the sat command
 complete -F _salomeTools_complete sat
 complete -F _salomeTools_complete ./sat