Skip to content

Commit f66cb26

Browse files
authored
Add aliases (#33)
## Overview Adds aliases for folks like me who have a bad memory and/or don't use completions
1 parent bed52e3 commit f66cb26

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

cmd/browsers.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,9 +1738,10 @@ func generateRandomExtensionName() string {
17381738
}
17391739

17401740
var browsersCmd = &cobra.Command{
1741-
Use: "browsers",
1742-
Short: "Manage browsers",
1743-
Long: "Commands for managing Kernel browsers",
1741+
Use: "browsers",
1742+
Aliases: []string{"browser"},
1743+
Short: "Manage browsers",
1744+
Long: "Commands for managing Kernel browsers",
17441745
}
17451746

17461747
var browsersListCmd = &cobra.Command{

cmd/extensions.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,10 @@ func (e ExtensionsCmd) Upload(ctx context.Context, in ExtensionsUploadInput) err
310310
// --- Cobra wiring ---
311311

312312
var extensionsCmd = &cobra.Command{
313-
Use: "extensions",
314-
Short: "Manage browser extensions",
315-
Long: "Commands for managing Kernel browser extensions",
313+
Use: "extensions",
314+
Aliases: []string{"extension"},
315+
Short: "Manage browser extensions",
316+
Long: "Commands for managing Kernel browser extensions",
316317
}
317318

318319
var extensionsListCmd = &cobra.Command{

cmd/logs.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import (
1212
)
1313

1414
var logsCmd = &cobra.Command{
15-
Use: "logs <app_name>",
16-
Short: "Show logs for a Kernel application",
17-
Args: cobra.ExactArgs(1),
18-
RunE: runLogs,
15+
Use: "logs <app_name>",
16+
Aliases: []string{"log"},
17+
Short: "Show logs for a Kernel application",
18+
Args: cobra.ExactArgs(1),
19+
RunE: runLogs,
1920
}
2021

2122
func init() {

cmd/profiles.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,10 @@ func (p ProfilesCmd) Download(ctx context.Context, in ProfilesDownloadInput) err
207207
// --- Cobra wiring ---
208208

209209
var profilesCmd = &cobra.Command{
210-
Use: "profiles",
211-
Short: "Manage profiles",
212-
Long: "Commands for managing Kernel browser profiles",
210+
Use: "profiles",
211+
Aliases: []string{"profile"},
212+
Short: "Manage profiles",
213+
Long: "Commands for managing Kernel browser profiles",
213214
}
214215

215216
var profilesListCmd = &cobra.Command{

cmd/proxies/proxies.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66

77
// ProxiesCmd is the parent command for proxy operations
88
var ProxiesCmd = &cobra.Command{
9-
Use: "proxies",
10-
Short: "Manage proxy configurations",
11-
Long: "Commands for managing proxy configurations for browser sessions",
9+
Use: "proxies",
10+
Aliases: []string{"proxy"},
11+
Short: "Manage proxy configurations",
12+
Long: "Commands for managing proxy configurations for browser sessions",
1213
Run: func(cmd *cobra.Command, args []string) {
1314
// If called without subcommands, show help
1415
_ = cmd.Help()

0 commit comments

Comments
 (0)