From: Serge Rehbinder Date: Fri, 2 Sep 2016 10:01:33 +0000 (+0200) Subject: Add completion for the package command X-Git-Tag: 5.0.0a1~151 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bdd2b0668b26de3e52a44957802177dc7c5448ce;p=tools%2Fsat.git Add completion for the package command --- diff --git a/commands/package.py b/commands/package.py index a040162..582dd0c 100644 --- a/commands/package.py +++ b/commands/package.py @@ -79,13 +79,11 @@ project_file_paths : [$VARS.salometoolsway + $VARS.sep + \"..\" + $VARS.sep""" parser = src.options.Options() parser.add_option('b', 'binaries', 'boolean', 'binaries', _('Produce a binary package.'), False) -parser.add_option('f', 'force_creation', 'boolean', 'force_creation', - _('Create the archive even if there are missing products.'), False) parser.add_option('s', 'sources', 'boolean', 'sources', _('Produce a compilable archive of the sources of the application.'), False) parser.add_option('p', 'project', 'string', 'project', _('Produce an archive that contains a project.'), "") -parser.add_option('', 'sat', 'boolean', 'sat', +parser.add_option('', 'salometools', 'boolean', 'sat', _('Produce an archive that contains salomeTools.'), False) parser.add_option('n', 'name', 'string', 'name', _('The name or full path of the archive.'), None) diff --git a/complete_sat.sh b/complete_sat.sh index 0b4c71b..3c3ee31 100755 --- a/complete_sat.sh +++ b/complete_sat.sh @@ -46,6 +46,9 @@ _show_applications() test) opts2=$(echo --base --display --grid --launcher --session $opts2) ;; + package) + opts2=$(echo --name --project --salometools $opts2) + ;; esac COMPREPLY=( $(compgen -W "${opts2}" -- ${cur}) ) @@ -92,7 +95,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 --help" + opts="config log testcommand source patch prepare environ clean configure make makeinstall compile launcher run jobs job shell test package --help" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi @@ -221,6 +224,11 @@ _salomeTools_complete() COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; + package) + opts="--name --binaries --sources --project --salometools --with_vcs" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; *) return 0 ;; esac