Mislav Marohnić
424acfa86f
[api] Implement REST pagination
2019-06-15 15:16:16 +02:00
Mislav Marohnić
dadc26d2e4
Allow repository names that start with a dash character
...
These are allowed on GitHub.
2019-03-18 12:49:42 +01:00
Mislav Marohnić
09710c7745
Remove unused `ogier/pflag`
2019-01-18 04:16:46 +01:00
Mislav Marohnić
ee31304ba7
Switch `issue` to new args parser
2019-01-18 04:09:43 +01:00
Mislav Marohnić
f06e506ef8
Switch `release` to new args parser
2019-01-18 03:47:50 +01:00
Mislav Marohnić
26d2a1fa4a
Fix usage synopsis for nested commands
...
This is displayed for e.g. flag parsing errors like `hub pr list --foo`
2019-01-18 03:47:50 +01:00
Mislav Marohnić
33eb313452
Switch `compare` to new args parser
2019-01-18 03:47:48 +01:00
Mislav Marohnić
2ca05c036e
Switch `browse` to new args parser
2019-01-18 01:50:29 +01:00
Mislav Marohnić
c0db6e6f0c
Use ArgsParser for commands that don't declare flags via pflag
2019-01-18 01:50:28 +01:00
Mislav Marohnić
fccfb060b2
Print usage help on stdout when `--help` was requested
2019-01-03 02:26:13 +01:00
Mislav Marohnić
cf02dd1118
Switch to new md2roff process in `make man-pages`
2018-12-29 14:33:12 +01:00
Mislav Marohnić
02989309ed
Docs formatting issues
2018-12-28 17:54:15 +01:00
Mislav Marohnić
1bb1b025fe
Simplify flag handling in `hub release` commands
2016-01-31 22:45:01 +11:00
Mislav Marohnić
fa32dae621
Have help for all release subcommands show for `hub help release`
2016-01-31 18:57:44 +11:00
Mislav Marohnić
1918e011a6
Restructure how command usage is stored and displayed
...
- No more `c.Short` property. Instead, the first line of `c.Long`
property is considered a short command description.
- The `c.Usage` text can now contain multiple lines.
- The new `c.Synopsis()` method renders usage synopsis for humans:
Usage: hub my-command --arg
hub my-command --alternative-arg
- The new `c.HelpText()` method renders synopsis + full help text.
2016-01-25 02:23:26 +11:00
Mislav Marohnić
1b862e3388
Switch from godep & rewriting import paths to GO15VENDOREXPERIMENT
2016-01-20 14:46:44 +11:00
Mislav Marohnić
d45511c7aa
Fix parsing arguments for `browse` command
...
After `browse` was indicated as "GitExtension: false", it now gets
automatically parsed by pflag library. That has an adverse effect that
it loses information about the `--` value being passed, since pflag
treats it as terminator value and swallows it silently.
Now, introduce the `args.Terminator` property to check if terminator was
present or not, and use that in `browse` to restore previous behavior.
2015-06-05 01:01:02 +02:00
Jingwen Owen Ou
177640dbd4
Extract logic of printing out to console
...
Introduce a `console` package which encapsulates logic of printing out
to console. This provides flexibility of discarding output in tests.
It also allows us to unify format of printing to console (if we want to).
This fixes #801 .
2015-02-20 13:19:24 -08:00
Jingwen Owen Ou
0bbfad695e
Make `lookupCommand` a local method to `Command`
2015-01-12 22:13:41 -08:00
Jingwen Owen Ou
6137851f15
Vendor dependencies by rewriting import paths
2014-11-30 09:16:57 -08:00
Jingwen Owen Ou
c49dd3f52f
Exit with error if command-line flag parsing fails
2014-04-15 15:56:53 +02:00
Jingwen Owen Ou
c03677596e
Minor refactoring to Command.subCommandsUsage
...
For each loop handles nil array. Refactor local var key to usage to be more explicit.
2013-12-30 20:50:20 -08:00
David Calavera
439a0dbe17
Print subcommand lookup errors.
2013-12-29 20:06:28 -08:00
David Calavera
df13d0125e
Be consistent about the exec name again.
...
Because this PR is not about that.
2013-12-29 19:54:41 -08:00
David Calavera
609013d800
Allow interspersed arguments.
2013-12-29 19:31:09 -08:00
David Calavera
4fb7042963
Set usage function for subcommands.
2013-12-29 19:20:41 -08:00
David Calavera
109fb85818
Use a POSIX compatible flag parser.
...
So we can use flags before and after arguments, and we can group boolean flags, just like git does.
2013-12-29 15:07:58 -08:00
David Calavera
6b14c4a7e5
Do not parse the argument for git extensions.
2013-12-29 14:44:09 -08:00
David Calavera
371ae8b432
Add global commands to the runner.
...
- Use a hash to lookup for commands.
- Add more tests for the command and runner execution.
2013-12-29 14:18:14 -08:00
David Calavera
fca6287df9
Print command and subcommand short usage when calling an unknown command.
2013-12-28 21:58:29 -08:00
David Calavera
51428d5449
Allow to chain subcommands using `command.Use(subcommandName, subcommand)`.
2013-12-28 21:24:08 -08:00
David Calavera
2e6c824876
Add command to create releases.
2013-12-19 15:49:36 -08:00
Jingwen Owen Ou
7b8770d228
Add update command
2013-12-18 10:57:01 -08:00
Jingwen Owen Ou
14b7a0e2ee
Refactor to command.FormattedUsage()
2013-12-14 07:22:23 -08:00
Jingwen Owen Ou
12edd78d93
Fix typo
2013-10-23 16:25:21 -07:00
Damian Gryski
da38984a88
Add a command to list issues for a repository
2013-10-23 22:24:01 +02:00
Jingwen Owen Ou
b807210a32
Listing GitHub releases 👯
2013-09-26 12:59:31 -07:00
Theodore Kokkoris
908299191f
Added submodule command and tests
2013-07-20 07:32:35 -07:00
Jingwen Owen Ou
57e993bd3b
Add cherry-pick stub
2013-07-19 14:26:00 -07:00
Theodore Kokkoris
23fdee0906
Added gh push
2013-07-18 15:47:34 -07:00
Jingwen Owen Ou
0d0dc4753c
Add apply stub
2013-07-18 15:09:14 -07:00
Jingwen Owen Ou
19c1ffa619
`gh help` to print help from `gh`
...
For `git help`, run `gh COMMAND --help`
2013-07-10 16:38:12 -07:00
Jingwen Owen Ou
329d4fa3fa
Add fetch stub
2013-07-10 10:49:05 -07:00
Jingwen Owen Ou
995c09c5ee
Add create stub
2013-07-09 11:03:07 -07:00
Jingwen Owen Ou
5f956792aa
Implement init
2013-07-04 16:29:19 -07:00
Jingwen Owen Ou
ccef819232
Create init stub
2013-07-04 16:29:19 -07:00
Jingwen Owen Ou
c4425a04e4
Add merge command
2013-07-02 09:59:02 -07:00
Jingwen Owen Ou
f2ee200ba4
Implement clone
2013-07-01 10:11:02 -07:00
Jingwen Owen Ou
3e21478773
Fix remote not accepting normal args
2013-06-30 09:00:21 -07:00
Jingwen Owen Ou
cc4c4ed068
Expand pull-request and ci-status to avoid alias collision
2013-06-29 13:55:11 -07:00