Skip to content

Commit

Permalink
Add error for non-existent command
Browse files Browse the repository at this point in the history
Re: Issue #12
  • Loading branch information
sigmavirus24 committed May 13, 2013
1 parent ac6eb8b commit dd92801
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 140 deletions.
149 changes: 9 additions & 140 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,146 +36,15 @@ help
$ gh help
# Alternatively gh -h

::

$ gh help follow
$ gh help fork
$ gh help gists
$ gh help issues
$ gh help my
$ gh help pulls
$ gh help repos
$ gh help unfollow

create.gist
~~~~~~~~~~~

::

$ echo "This is stdin" | gh create.gist -
$ gh create.gist -d "Public gist" file1.rb file2.rb file3.rb
$ gh create.gist -p -d "Private gist" file1.py file2.py file3.py

create.issue
~~~~~~~~~~~~

::

$ gh create.issue -t 'New bug found in version 0.10'

create.pull
~~~~~~~~~~~

::

$ gh create.pull -t 'Fixes issue #50' sigmavirus24:fix50 master
$ gh create.pull -i 50 sigmavirus24:fix50 master

create.repo
~~~~~~~~~~~

::

$ gh create.repo awesome_repo
$ gh create.repo -o orgname awesome_repo

follow
~~~~~~

::

$ gh follow kennethreitz
$ gh follow sigmavirus24

fork.gist
~~~~~~~~~

::

$ gh fork.gist 10

fork.repo
~~~~~~~~~

::

$ gh fork.repo kennethreitz/requests
$ gh fork.repo sigmavirus24/github3.py
$ gh fork.repo sigmavirus24/github-cli

gists
~~~~~

::

$ gh gists
$ gh gists -u sigmavirus24

issues
~~~~~~

::

$ cd path/to/repo/on/GitHub
$ gh issues
$ gh -r sigmavirus24/github3.py issues
$ gh -r sigmavirus24/github3.py issues 48
$ gh issues 48 close
$ gh issues 48 reopen
$ gh issues 48 comment
$ gh issues 48 comments

my
~~

::

$ gh my notifications
$ gh my dashboard
$ gh my issues
$ gh my stars
$ gh my profile

pulls
~~~~~

::

$ cd path/to/repo/on/GitHub
$ gh pulls
$ gh pulls 48 merge
$ gh pulls 48 close
$ gh pulls 48 comments

repos
~~~~~

::

$ gh repos kennethreitz

star
~~~~

::

$ gh star kennethreitz/tablib
$ gh star some_repo_i_own

unfollow
~~~~~~~~

::

$ gh unfollow sigmavirus24

unstar
~~~~~~

::

$ gh unstar some_repo_i_own
$ gh unstar sigmavirus24/requests
$ gh help issue
$ gh help issue.assign
$ gh help issue.close
$ gh help issue.comment
$ gh help issue.comments
$ gh help issue.create
$ gh help issue.ls
$ gh help issue.reopen

License
-------
Expand Down
2 changes: 2 additions & 0 deletions gh/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ def main():
if status == commands[command].COMMAND_UNKNOWN:
print('Unknown subcommand or option.')
commands[command].help()
else:
main_parser.error('No such command "{0}"'.format(command))

sys.exit(status)

0 comments on commit dd92801

Please sign in to comment.