echo ${x}
done)
- # additional options for command working without products
+ # additional options for command working without applications
case "${command}" in
config)
opts2=$(echo --list --value --edit --info $opts2)
COMPREPLY=( $(compgen -W "${opts2}" -- ${cur}) )
}
+_show_products()
+{
+ if [[ $appli != $prev ]]
+ then
+ opts=$(for x in `$SAT_PATH/sat -s config $appli -nv APPLICATION.products`
+ do echo ${x}; done)
+
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ fi
+}
+
_salomeTools_complete()
{
if [[ "${SAT_PATH}x" == "x" ]]
# first argument => show available commands
if [[ ${argc} == 1 ]]
then
- opts="config log testcommand --help"
+ opts="config log testcommand source patch prepare environ clean configure make makeinstall compile --help"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
return 0
fi
-
- # show list of softwares
- if [[ ${prev} == "--module" || ${prev} == "-m" ]]
+
+ # show list of products
+ if [[ ${prev} == "--product" || ${prev} == "-p" ]]
then
- prod="${COMP_WORDS[2]}"
- if [[ ${command} != "test" ]]
+ appli="${COMP_WORDS[2]}"
+ if [[ ${command} != "source" ]]
then
- opts=$(for x in `$SAT_PATH/sat config $prod -nv PRODUCT.softwares`
+ opts=$(for x in `$SAT_PATH/sat config $appli -nv APPLICATION.products`
do echo ${x}; done)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
- fi
+ fi
fi
# show argument for each command
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="--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
+ ;;
*) return 0 ;;
esac
}
-# 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