Commit graph

49 commits

Author SHA1 Message Date
Kynan Ware
b8ee5c5eba Add godoc comments to exported symbols in remaining packages
Add documentation comments to exported symbols across all remaining
smaller packages including cmd/gen-docs, context, internal/browser,
internal/gh, internal/ghcmd, internal/ghinstance, internal/ghrepo,
internal/keyring, internal/run, internal/safepaths, internal/tableprinter,
internal/text, internal/update, pkg/cmd/accessibility, pkg/cmd/actions,
pkg/cmd/alias, pkg/cmd/api, pkg/cmd/browse, pkg/cmd/cache,
pkg/cmd/completion, pkg/cmd/copilot, pkg/cmd/factory, pkg/cmd/gpg-key,
pkg/cmd/label, pkg/cmd/licenses, pkg/cmd/org, pkg/cmd/preview,
pkg/cmd/ssh-key, pkg/cmd/version, pkg/extensions, pkg/jsoncolor,
pkg/markdown, pkg/option, pkg/set, pkg/ssh, pkg/surveyext, test,
internal/authflow, and utils.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:14:20 -07:00
Andy Feller
86ad62a62d Fixes #10590
Implement missing safeguard causing `gh alias delete` tests to wipe out tester's GitHub CLI configuration.
2025-03-26 13:42:39 -04:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Yukai Chou
07a87ca8a4 Wrap special values and placeholders like - and $1 2023-11-23 07:09:29 +08:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Yukai Chou
b70c28ba20 Misc docs improvements 2023-11-17 01:32:28 +08:00
Yukai Chou
896101678f Wrap cli commands in backticks uniformly 2023-11-17 01:32:00 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Jun Nishimura
925473eeb1
Add --all flag to alias delete command (#7900) 2023-09-07 10:56:44 +00:00
Jun Nishimura
c5eb188698
Add clobber flag to alias set (#7787) 2023-08-15 14:58:45 +00:00
Sam Coe
78839dbe0b
Fix alias import clobber flag (#7569) 2023-06-20 09:21:31 +09:00
Sam Coe
74ee8cacae
Allow creating of nested aliases (#7457) 2023-05-25 09:46:45 +09:00
Kevin Lee
03f1ba75ac
Add alias import command (#7118) 2023-05-04 09:17:39 +12:00
Paul Forness
e86b3ea91f
Change alias list output format to YAML (#6603)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-12-13 22:49:04 +01:00
Mislav Marohnić
3fe5026d39
Migrate to tableprinter from go-gh (#6346) 2022-10-17 15:15:39 +02:00
Sam Coe
cacff4ad6d
Use go-gh config package (#5771) 2022-06-23 11:50:04 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found (#5479)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Sam Coe
2c0236d096
Add extension upgrade --dry-run (#5098) 2022-04-12 07:18:08 +00:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands (#5214)
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 13:53:42 +01: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ć
efa4d43cf4 Simplify alias set documentation 2021-07-20 15:32:51 +02:00
chemotaxis
1e4e536bcb Revise Windows note 2021-07-19 15:50:27 -04:00
chemotaxis
2c52819c1a Remove note about using Git for Windows
As discussed in pull request #4013.
2021-07-19 15:50:12 -04:00
chemotaxis
23ffca45f7 Unify use of single quotes to mark shell arguments and variables
The first paragraph uses single quotes when referring to shell arguments
and variables, but the rest of the docs use double quotes.  This commit
switches to using single quotes throughout the docs.

I prefer to use single quotes inside string literals because Go uses
double quotes to define a string literal.
2021-07-19 00:46:06 -04:00
chemotaxis
5314e7c398 Add note about double quotes on non-Unix-like shells
On non-Unix-like shells like Windows Command Prompt, single quotes are
handled differently.  You need to define aliases using double quotes
instead of single quotes.

I added an inline example to illustrate the quotes.  The example is
formatted as inline code blocks in Markdown.  Unfortunately, because Go
uses backticks for raw string literals, I needed to do some rather ugly
string concatenation in order to get the backticks included in the doc
string.

This also rearranges the notes so that the platform specific notes are
at the end of the documentation.
2021-07-19 00:36:07 -04:00
nate smith
6c984f4512 remove dead code 2021-06-28 14:36:51 -05:00
Mislav Marohnić
f99191ea6f Enable setting an alias for an extension command 2021-06-21 16:54:08 +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
Heath Stewart
aaa5a9e949 Use - to read from stdin instead
Resolves PR feedback.
2021-04-23 17:23:27 -07:00
Heath Stewart
bd2738379b Optionally read stdin for gh alias set
Resolves #3487
2021-04-21 22:16:41 -07:00
Emmanuel Duchastenier
bcef9f83a8
fix typo in docs of alias command
correct syntax is `--assignee` instead of `--assigned`
2021-03-08 15:11:31 +01:00
Mislav Marohnić
f46bab256c Rename to SuccessIconWithColor 2021-01-25 14:56:39 +01:00
Mislav Marohnić
96fa6e7830 Merge remote-tracking branch 'origin' into success-icon-consistency 2021-01-22 23:56:54 +01:00
Mislav Marohnić
23d68705bc Match color of the success icon with the end state of the record 2021-01-22 23:55:33 +01:00
Mislav Marohnić
e334a1f10c Add docs for using @me to reference self 2021-01-22 22:14:47 +01:00
Mislav Marohnić
06cf2c9f81 Merge remote-tracking branch 'origin' into cmd-stub-new 2021-01-22 16:31:29 +01:00
Mislav Marohnić
75ebb863e3 Use testify assertions for error matching 2021-01-19 13:59:37 +01:00
Mislav Marohnić
fc77cbc964 Deprecate test.ExpectLines
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +01:00
Mislav Marohnić
683ebee6ef Consistently use green success icon
For operations such as closing an issue or merging a PR, we would
display the success icon (a checkmark) in red and magenta colors,
respectively, to reflect the latest state of the record operated on
(red: closed; magenta: merged).

This was always confusing to me, seeing it both in code and in the UI,
because I'm instinctively thinking that it's a bug and have to remind
myself that it's by design.
2021-01-18 19:57:38 +01:00
Cristian Dominguez
867f38970f Fix USAGE help for some commands 2020-11-13 10:10:53 -03:00
Mislav Marohnić
5b4a08dcb9 Ensure that only PATH is searched when shelling out to external commands
Works around https://github.com/golang/go/issues/38736 for Windows.
2020-11-11 16:33:13 +01:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
vilmibm
f3b4493448 print aliases as valid yaml when piping 2020-09-14 10:33:29 -05:00
vilmibm
451ece198b missed a disable auth check 2020-08-25 10:10:16 -05:00
Mislav Marohnić
2b9de23637 Extract alias expansion into a separate package 2020-08-11 15:18:48 +02:00
Mislav Marohnić
172ea2b078 Isolate all alias commands 2020-08-11 13:57:48 +02:00