Skip to content

Commit

Permalink
feat(cmd):support aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
vimiix committed Dec 13, 2023
1 parent 5be237f commit b2d049f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/ssx/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ func newDeleteCmd() *cobra.Command {
var ids []int
cmd := &cobra.Command{
Use: "delete",
Aliases: []string{"d", "del"},
Short: "delete entry by id",
Example: "ssx delete -i1 [-i2 ...]",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
5 changes: 3 additions & 2 deletions cmd/ssx/cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (

func newListCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "list",
Short: "list all entries",
Use: "list",
Aliases: []string{"l", "ls"},
Short: "list all entries",
RunE: func(cmd *cobra.Command, args []string) error {
return ssxInst.ListEntries()
}}
Expand Down
1 change: 1 addition & 0 deletions cmd/ssx/cmd/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func newTagCmd() *cobra.Command {
)
cmd := &cobra.Command{
Use: "tag",
Aliases: []string{"t"},
Short: "add or delete tag for entry by id",
Example: "ssx tag -i <ENTRY_ID> [-t TAG1 [-t TAG2 ...]] [-d TAG3 [-d TAG4 ...]]",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down

0 comments on commit b2d049f

Please sign in to comment.