Skip to content
Renaud Guillard edited this page Jun 3, 2013 · 6 revisions

sampleapp

Sample application

Author
Renaud Guillard
Version
1.0

Usage

sampleapp subcommand [subcommand option(s)] [-vs] [--help] [--ui-only <...>] [--standard-arg <...>] [--switch-alone-in-group] [(--tlxg1 <...> | --tlxg2 <...>)] [(--basic-argument <...> --string-argument <string> | --argument-with-default <...> | (--numeric-argument <number> | --float-argument <number>))] [--existing-file-argument <path>] [--rw-folder-argument <path>] [--mixed-fskind-argument <path>] [--multi-argument <...  [ ... ]> --multi-select-argument <...  [ ... ]> --multi-xml <path [ ... ]>] [-H <...>] [-P <path>] [-E <...>] [-e <...>]

Global options

	--help: Display the help message
	-v, --verbose, --bleeeeh: More text!
	--ui-only: A single argument option automatically set in the UI
	--standard-arg: Basic argument option
		This option will accept any kind of argument
	-s, --simpleswitch: Simple switch
		A simple switch option (true/false)
	A useless group option
		Single-options groups will be flattened in UI
		
		--switch-alone-in-group: Another switch
			This switch is in a group with only one option. So, the group is hidden and 
			the option appears at the same level
	
	Exclusive option group
		This group can be defined in gengetopt (top level, exclusive, switch-less)
		
		--tlxg1: ArgGA
		--tlxg2: ArgG2
	
	Exclusive option group
		Nested group (basic type arguments)
			--basic-argument: Basic argument
			--string-argument: String argument
				This argument expect a string, which is roughly the same thing as 
				accepting any kind of content
		
		--argument-with-default: Argument (with default value)
			A default value is proposed. If the user does not change it, the option 
			will not appear in the command line	
			Default value: Default value
		Nested exclusive group
			--numeric-argument: Numeric argument
				Only numberrs are accepted as argument value. A numeric argument appears 
				as a spin box in the UI
			--float-argument: Float argument
				Numeric argument with decimals. A minimum (1.0) and maximum (10) values 
				are also defined
		
	
	--existing-file-argument: File argument
		An existing file argument
	--rw-folder-argument: Folder argument
		Expect a folder with Read/Write access
	--mixed-fskind-argument: File, folder etc.
		Accept most of file system object types. On some UI and platforms, you can't 
		select a folder in the file box if files are also accepted.
	Multi argument options
		A non-exclusive group of options which accept one or more arguments
		
		--multi-argument: Multi argument
			A basic multi argument options	
			Minimal argument count: 2
			Maximal argument count: 3
		--multi-select-argument: Multi select argument
			Accept only a fixed set of values	
			The argument value have to be one of the following:	
				FirstOption, Second option or Third option
		--multi-xml: Xml files
			Expect a file. XML files are welcome but others are accepted
	
	-H, --hostname: Hostname
		Accept a host name. In console mode, the autocompletion will propose hosts 
		defined in /etc/hosts.
	-P, --simple-pattern-sh: 
	-E, --strict-enum: Strict enumeration	
		The argument value have to be one of the following:	
			Option A, Value B, Item C or ItemD with space
		Default value: Value B
	-e, --non-strict-enum: Non-restrictive enumeration
		Non restricive enumeration will only propose some values in autocompletion 
		but will accept any other values	
		The argument can be:	
			nOptionA, nValueB, nItemC or nItemD with space

Sub commands

sub

A sub-command (sub)

Usage
sampleapp sub [--switch] [--sc-existing-file-argument <path>] [--sc-strict-enum <...>]

	--switch, --sc-switch: Switch of the sub command
		The bound variable name can be the same as another subcommand variable or 
		one of the global option. In this case, you have to set the prg.sh.parser.
		prefixSubcommandOptionVariable xslt parameter to 'yes'
	--sc-existing-file-argument: Sub command file argument
	--sc-strict-enum: Sub command argument (strict set)	
		The argument value have to be one of the following:	
			OptionA, ValueB or ItemC

help

Help about other sub commands

Aliases
hep sos

version

Copyright & Licensing

//Copyright © 2012 by Renaud GUillard (dev@nore.fr) **Distributed under the terms of the MIT License, see LICENSE //

Clone this wiki locally