Salome HOME
products completion after --products or -p
[tools/sat.git] / complete_sat.sh
index 8f378952007fe0654956be1d34bc5b006c6d6419..02d54c4a3d4f7f0fb6ac28cee9dc5589877043f0 100755 (executable)
@@ -32,7 +32,7 @@ _show_applications()
             opts2=$(echo --list --value --edit --info $opts2)
             ;;
         log)
-            opts2=$(echo --clean --full --last --terminal $opts2)
+            opts2=$(echo --clean --full --last --terminal --no_browser $opts2)
             ;;
         jobs)
             opts2=$(echo --name --only_jobs --list --completion --test_connection --input_boards --publish $opts2)
@@ -67,7 +67,7 @@ _show_products()
 {
     if [[ $appli != $prev ]]
     then
-        opts=$(for x in `$SAT_PATH/sat -s config $appli -nv APPLICATION.products`
+        opts=$(for x in `$SAT_PATH/sat config $appli --completion`
             do echo ${x}; done)
 
         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
@@ -104,7 +104,7 @@ _salomeTools_complete()
     # first argument => show available commands
     if [[ ${argc} == 1 ]]
     then
-        opts="config log testcommand source patch prepare environ clean configure make makeinstall compile launcher run jobs job shell test package generate find_duplicates application template base --help"
+        opts="config log testcommand source patch prepare environ clean configure make makeinstall compile launcher run jobs job shell test package generate find_duplicates application template base profile script --help"
         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
         return 0
     fi
@@ -138,12 +138,12 @@ _salomeTools_complete()
     fi
       
     # show list of products
-    if [[ ${prev} == "--product" || ${prev} == "-p" ]]
+    if [[ ${prev} == "--product" || ${prev} == "-p" || ${prev} == "--info" || ${prev} == "-i" ]]
     then
         appli="${COMP_WORDS[2]}"
         if [[ ${command} != "source" ]]
         then
-            opts=$(for x in `$SAT_PATH/sat config $appli -nv APPLICATION.products`
+            opts=$(for x in `$SAT_PATH/sat config $appli --completion`
                 do echo ${x}; done)
 
                COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
@@ -154,12 +154,12 @@ _salomeTools_complete()
     # show argument for each command
     case "${command}" in
         config)
-            opts="--value --list --copy --edit --no_label --info"
+            opts="--value --list --copy --edit --no_label --info --show_patchs"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0        
             ;;
         log)
-            opts="--clean --last --terminal --last"
+            opts="--clean --last --terminal --last --no_browser"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
@@ -204,7 +204,7 @@ _salomeTools_complete()
             return 0
             ;;
         compile)
-            opts="--products --with_fathers --with_children --clean_all --make_flags --show --stop_first_fail"
+            opts="--products --with_fathers --with_children --clean_all --make_flags --show --stop_first_fail --check"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
@@ -234,7 +234,7 @@ _salomeTools_complete()
             return 0
             ;;
         package)
-            opts="--name --binaries --sources --project --salometools --with_vcs"
+            opts="--name --binaries --sources --project --salometools --with_vcs --without_commercial --without_property"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
@@ -263,6 +263,16 @@ _salomeTools_complete()
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
+        profile)
+            opts="--prefix --name --force --no_update --version --slogan"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        script)
+            opts="--products --nb_proc"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
         *) return 0 ;;
     esac