Describe the bug
As mentioned in the title, the command args syntax is inconsistent.
Affected version
$ gh --version
gh version 2.67.0 (2025-02-11)
https://github.com/cli/cli/releases/tag/v2.67.0
Steps to reproduce the behavior
Use regex Use:\s+".* \{.*\}.*" to find occurrences with curly braces
Here's a list of such occurrences from VSCode:
20 results - 19 files
pkg/cmd/alias/delete/delete.go:
28: Use: "delete {<alias> | --all}",
pkg/cmd/extension/command.go:
423: Use: "upgrade {<name> | --all}",
pkg/cmd/gist/delete/delete.go:
38: Use: "delete {<id> | <url>}",
pkg/cmd/gist/edit/edit.go:
59: Use: "edit {<id> | <url>} [<filename>]",
pkg/cmd/gist/rename/rename.go:
38: Use: "rename {<id> | <url>} <oldFilename> <newFilename>",
pkg/cmd/issue/close/close.go:
38: Use: "close {<number> | <url>}",
pkg/cmd/issue/comment/comment.go:
25: Use: "comment {<number> | <url>}",
pkg/cmd/issue/delete/delete.go:
41: Use: "delete {<number> | <url>}",
pkg/cmd/issue/develop/develop.go:
45: Use: "develop {<number> | <url>}",
pkg/cmd/issue/edit/edit.go:
52: Use: "edit {<numbers> | <urls>}",
pkg/cmd/issue/lock/lock.go:
128: Use: "lock {<number> | <url>}",
171: Use: "unlock {<number> | <url>}",
pkg/cmd/issue/pin/pin.go:
35: Use: "pin {<number> | <url>}",
pkg/cmd/issue/reopen/reopen.go:
36: Use: "reopen {<number> | <url>}",
pkg/cmd/issue/transfer/transfer.go:
35: Use: "transfer {<number> | <url>} <destination-repo>",
pkg/cmd/issue/unpin/unpin.go:
35: Use: "unpin {<number> | <url>}",
pkg/cmd/issue/view/view.go:
49: Use: "view {<number> | <url>}",
pkg/cmd/pr/close/close.go:
40: Use: "close {<number> | <url> | <branch>}",
pkg/cmd/pr/reopen/reopen.go:
32: Use: "reopen {<number> | <url> | <branch>}",
pkg/cmd/repo/license/view/view.go:
37: Use: "view {<license-key> | <SPDX-ID>}",
The majority of the commands are using square brackets syntax:
curly braces (Use:\s+".* \{.*\}.*") (20 results )
square brackets (Use:\s+".* \[.*\].*") (75 results )
Expected vs actual behavior
The syntax should be consistent.
Logs
N/A
Reactions are currently unavailable
Describe the bug
As mentioned in the title, the command args syntax is inconsistent.
Affected version
Steps to reproduce the behavior
Use:\s+".* \{.*\}.*"to find occurrences with curly bracesHere's a list of such occurrences from VSCode:
The majority of the commands are using square brackets syntax:
Use:\s+".* \{.*\}.*") (20 results)Use:\s+".* \[.*\].*") (75 results)Expected vs actual behavior
The syntax should be consistent.
Logs
N/A