Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update website on how to use option aliases. #275

Merged
merged 1 commit into from

2 participants

@josemota

For some time now, option aliases are declared as strings, with the dash
prepended. This commit updates the website information regarding that topic.

@josemota josemota Switch :a for "-a".
For some time now, option aliases are declared as strings, with the dash
prepended. This commit updates the website information regarding that topic.
73e00f6
@eventualbuddha eventualbuddha merged commit 22a2981 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2012
  1. @josemota

    Switch :a for "-a".

    josemota authored
    For some time now, option aliases are declared as strings, with the dash
    prepended. This commit updates the website information regarding that topic.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 website/content/index.markdown
View
5 website/content/index.markdown
@@ -262,7 +262,8 @@ The full list of metadata you can provide for an option:
option cannot be both `:required` and have a `:default`.
* `:type`: `:string`, `:hash`, `:array`, `:numeric`, or `:boolean`
* `:aliases`: A list of aliases for this option. Typically, you would
- use aliases to provide short versions of the option.
+ use aliases to provide short versions of the option. Each alias is a string
+ and it has a prepended dash (for example: `"-f"`).
You can use a shorthand to specify a number of options at once if you
just want to specify the type of the options. You could rewrite the
@@ -374,7 +375,7 @@ module GitCLI
class Git < Thor
desc "fetch <repository> [<refspec>...]", "Download objects and refs from another repository"
options :all => :boolean, :multiple => :boolean
- option :append, :type => :boolean, :aliases => :a
+ option :append, :type => :boolean, :aliases => "-a"
def fetch(respository, *refspec)
# implement git fetch here
end
Something went wrong with that request. Please try again.