Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
📝 Update command docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Oct 18, 2022
1 parent 4ff56e9 commit 0cbb68a
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 19 deletions.
40 changes: 29 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,32 @@ gh extension install gabe565/gh-profile

## Usage

- `gh profile create` - Prompts to add a new profile.
- `gh profile create example` - Adds a profile named example.
- `gh profile switch` - Prompts to choose a profile from an interactive list.
- `gh profile switch default` - Switches to a profile named default.
- `gh profile rename` - Prompts to rename a profile.
- `gh profile rename example example2` - Renames a profile named example to example2.
- `gh profile list` - Lists all profiles.
- `gh profile remove` - Prompts to remove a profile.
- `gh profile remove example` - Removes a profile named example.

See [generated usage docs](./docs/profile.md) for more information.
See the [generated usage docs](./docs/profile.md), or see a summary of each
subcommand below.

### `gh profile create [NAME]`
Creates a new profile called `name`.
Name is optional. If not set, command will run interactively.
Aliases: `new`, `add`

### `gh profile switch [NAME]`
Activates the profile called `name`.
Name is optional. If not set, command will run interactively.
Aliases: `activate`, `active`, `sw`

### `gh profile rename [NAME] [NEW_NAME]`
Renames a profile called `old` to `new`.
Old and new name are optional. If not set, command will run interactively.
Aliases: `mv`

### `gh profile list`
Lists all profiles. Active profile will be bold with a green check.
Aliases: `ls`, `l`

### `gh profile remove [NAME]`
Removes a profile called `name`.
Name is optional. If not set, command will run interactively.
Aliases: `delete`, `rm`

### `gh profile show`
Prints the active profile name. If no profile is active, will print `none`.
2 changes: 1 addition & 1 deletion cmd/create/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func New() *cobra.Command {
return &cobra.Command{
Use: "create [name]",
Use: "create [NAME]",
Aliases: []string{"c", "new", "add"},
Short: "Creates a new profile",
RunE: run,
Expand Down
2 changes: 1 addition & 1 deletion cmd/remove/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func New() *cobra.Command {
return &cobra.Command{
Use: "remove [name]",
Use: "remove [NAME]",
Aliases: []string{"delete", "rm", "d"},
Short: "Deletes a profile",
RunE: run,
Expand Down
2 changes: 1 addition & 1 deletion cmd/rename/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func New() *cobra.Command {
return &cobra.Command{
Use: "rename [name] [new-name]",
Use: "rename [NAME] [NEW_NAME]",
Aliases: []string{"mv"},
Short: "Renames a profile",
RunE: run,
Expand Down
2 changes: 1 addition & 1 deletion cmd/switch/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func New() *cobra.Command {
return &cobra.Command{
Use: "switch [name]",
Use: "switch [NAME]",
Aliases: []string{"activate", "active", "sw", "s"},
Short: "Switch active profile",
RunE: run,
Expand Down
2 changes: 1 addition & 1 deletion docs/profile_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Creates a new profile

```
profile create [name] [flags]
profile create [NAME] [flags]
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/profile_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Deletes a profile

```
profile remove [name] [flags]
profile remove [NAME] [flags]
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/profile_rename.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Renames a profile

```
profile rename [name] [new-name] [flags]
profile rename [NAME] [NEW_NAME] [flags]
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/profile_switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Switch active profile

```
profile switch [name] [flags]
profile switch [NAME] [flags]
```

### Options
Expand Down

0 comments on commit 0cbb68a

Please sign in to comment.