Commit graph

19 commits

Author SHA1 Message Date
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Mislav Marohnić
cfaca91d06 Fix --version flag printing to stdout 2022-05-24 16:21:13 +02:00
Mislav Marohnić
2139e763fb Write Cobra deprecation messages to stderr
We used to do the equivalent of `rootCmd.SetOut(os.Stdout)` because we
thought that Cobra's "Out" stream represents standard output. However,
upon closer inspection it turns out that this is Cobra's stream for
usage errors and deprecation warnings, and those we want written to
stderr as well. It is not clear to me why Cobra maintains a distinction
between "Out" and "Err" streams since both seem to go to sdterr by
default.

This change also ceases our usage of `command.Print()` functions in
favor of explicitly writing to `IOStreams.Out/ErrOut`.
2022-05-23 20:23:42 +02:00
Sam Coe
2c0236d096
Add extension upgrade --dry-run (#5098) 2022-04-12 07:18:08 +00:00
Mislav Marohnić
7235384f12 gh: list help topics in help output 2022-02-18 18:39:30 +01:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
0d999ddaa1 Rework local extensions for Windows
Replace the implementation that relied on symlinks with the one that
create regular files that act like symlinks: they contain a reference to
the local directory where to find the extension.
2021-07-28 22:47:54 +02:00
Mislav Marohnić
1ec47d8191 Improvements to gh extensions
- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME
2021-06-21 16:54:08 +02:00
Mislav Marohnić
e327b42f79 Add gh help formatting topic & link to it from commands with JSON output 2021-04-14 18:27:15 +02:00
Sam Coe
8b1ed28121
Add section in help for actions commands 2021-04-01 21:05:50 -07:00
Josh Soref
76bd377253 spelling: error 2020-11-21 21:43:51 -05:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
Sam Coe
53a97c3414
Extract rootFlagErrrorFunc into root help 2020-09-30 12:49:17 +02:00
Sam Coe
21449213e5
Expand help topic functionality 2020-09-14 17:50:50 +02:00
Mislav Marohnić
3c32507a13 Consistent use of quotes to delineate commands to be run 2020-09-14 16:26:23 +02:00
Mislav Marohnić
aa72463114 Extract environment as a separate help topic
Co-authored-by: Sam Coe <samcoe@github.com>
2020-09-14 16:25:30 +02:00
Mislav Marohnić
f7d0988799 Offer different editor modes during release create 2020-08-25 20:20:44 +02:00
Mislav Marohnić
aef1a4ba4d Extract root command and factory logic into separate packages 2020-08-07 14:40:33 +02:00
Renamed from command/help.go (Browse further)