]> SALOME platform Git repositories - tools/sat.git/blobdiff - complete_sat.sh
Salome HOME
add the completion for the base command
[tools/sat.git] / complete_sat.sh
index 257ec4b58a3be621ce9bcc10898c89522061da03..c17a4cb5c279c3725fb0fbc1207d7b58c0d9484c 100755 (executable)
@@ -34,16 +34,40 @@ _show_applications()
         log)
             opts2=$(echo --clean --full --last --terminal $opts2)
             ;;
+        jobs)
+            opts2=$(echo --name --only_jobs --list --completion --test_connection --input_boards --publish $opts2)
+            ;;
+        shell)
+            opts2=$(echo --command --sat $opts2)
+            ;;
+        job)
+            opts2=$(echo --jobs_config --name $opts2)
+            ;;
+        test)
+            opts2=$(echo --base --display --grid --launcher --session $opts2)
+            ;;
+        package)
+            opts2=$(echo --name --project --salometools $opts2)
+            ;;
+        find_duplicates)
+            opts2=$(echo --path --exclude-file --exclude-extension --exclude-path $opts2)
+            ;;
+        template)
+            opts2=$(echo --name --template --target --param --info $opts2)
+            ;;
+        base)
+            opts2=$(echo --set $opts2)
+            ;;
     esac
 
     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 +104,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 launcher run jobs job shell test package generate find_duplicates application template base --help"
         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
         return 0
     fi
@@ -113,13 +137,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}) )
@@ -130,7 +154,7 @@ _salomeTools_complete()
     # show argument for each command
     case "${command}" in
         config)
-            opts="--value --list --copy --edit --no_label"
+            opts="--value --list --copy --edit --no_label --info"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0        
             ;;
@@ -139,13 +163,103 @@ _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="--module --no_sample --force"
+            opts="--products"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
         patch)
-            opts="--module --no_sample"
+            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
+            ;;
+        launcher)
+            opts="--name --catalog --gencat"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        jobs)
+            opts="--name --only_jobs --list --completion --test_connection --input_boards --publish"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        shell)
+            opts="--command"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        job)
+            opts="--jobs_config --name"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        test)
+            opts="--base --launcher --grid --session --display"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        package)
+            opts="--name --binaries --sources --project --salometools --with_vcs"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        generate)
+            opts="--products --yacsgen"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        find_duplicates)
+            opts="--path --sources --exclude-file --exclude-extension --exclude-path"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        application)
+            opts="--name --catalog --target --gencat --module"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        template)
+            opts="--name --template --target --param --info"
+            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            return 0
+            ;;
+        base)
+            opts="--set"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;
@@ -154,7 +268,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