Skip to content

Commit

Permalink
Adds more doc about --help; fixes incorrect string for rack init
Browse files Browse the repository at this point in the history
Partial for #290
  • Loading branch information
annegentle committed Aug 19, 2015
1 parent 15e96cf commit 86f0046
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
41 changes: 40 additions & 1 deletion docs/globaloptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ and allow you to customize various aspects of the ``rack`` tool at runtime.
These options may override configuration file or environment variables you have
set previously, change output format or other aspects of the tool.

For example:
Display any available command-line flags by appending `--help` to list the
flags available::

rack <service> <command> <subcommand> --help

For example, you can get JSON output from any series of commands:

::

Expand Down Expand Up @@ -220,5 +225,39 @@ And again, per subcommand::
delete rack servers keypair delete [--name <keypairName>] [flags]
help, h Shows a list of commands or help for one command

And one more time, per action::

rack servers instance list --help
NAME: list - rack servers instance list [flags]

DESCRIPTION: Lists existing servers

COMMAND FLAGS:
--all-pages [optional] Return all servers. Default is to paginate.
--name [optional] Only list servers with this name.
--changes-since [optional] Only list servers that have been changed since this time/date stamp.
--image [optional] Only list servers that have this image ID.
--flavor [optional] Only list servers that have this flavor ID.
--status [optional] Only list servers that have this status.
--marker [optional] Start listing servers at this server ID.
--limit [optional] Only return this many servers at most.
--fields [optional] Only return these comma-separated case-insensitive fields.
Choices: id, name, status, publicipv4, privateipv4, image, flavor


GLOBAL FLAGS:
--username The username with which to authenticate.
--api-key The API key with which to authenticate.
--auth-tenant-id The tenant ID of the user to authenticate as. May only be provided as a command-line flag.
--auth-token The authentication token of the user to authenticate as. This must be used with the `auth-tenant-id` flag.
--auth-url The endpoint to which authenticate.
--region The region to which authenticate.
--use-service-net Whether or not to use the internal Rackspace network
--profile The config file profile to use for authentication.
--output Format in which to return output. Options: json, csv, table. Default is 'table'.
--no-cache Don't get or set authentication credentials in the rack cache.
--log Print debug information from the command. Options are: debug, info
--no-header Don't return a header for CSV nor tabular output.


.. JSON: http://json.org/
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ func Cmds() []cli.Command {
},
{
Name: "init",
Usage: strings.Join([]string{"Interactively create a config file.",
Usage: strings.Join([]string{"Enable tab for command completion.",
"\tFor Linux and OS X, creates the `rack` man page and sets up",
"\tcommand completion for the Bash shell.",
"\tcommand completion for the Bash shell. Run `man ./rack.1` to",
"\tview the generated man page.",
"\tFor Windows, creates a `posh_autocomplete.ps1` file in the",
"\t`$HOME/.rack` directory. You must run the file to set up",
"\tcommand completion."}, "\n"),
Expand Down

0 comments on commit 86f0046

Please sign in to comment.