From 22fa7feab3de8b81c242f701324c3e7233e5b566 Mon Sep 17 00:00:00 2001 From: abs3nt Date: Fri, 20 Jan 2023 14:19:16 -0800 Subject: [PATCH] aliases --- src/cmd/next.go | 2 +- src/cmd/nowplaying.go | 7 ++++--- src/cmd/pause.go | 7 ++++--- src/cmd/play.go | 2 +- src/cmd/previous.go | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/cmd/next.go b/src/cmd/next.go index a732b42..c174438 100644 --- a/src/cmd/next.go +++ b/src/cmd/next.go @@ -14,7 +14,7 @@ func init() { var nextCmd = &cobra.Command{ Use: "next {amount}", - Aliases: []string{"n"}, + Aliases: []string{"n", "skip"}, Args: cobra.MatchAll(cobra.RangeArgs(0, 1)), Short: "Skip to next song or skip the specified number of tracks", Long: `Skip to next song of skip the specified number of tracks`, diff --git a/src/cmd/nowplaying.go b/src/cmd/nowplaying.go index ef4b910..466ace5 100644 --- a/src/cmd/nowplaying.go +++ b/src/cmd/nowplaying.go @@ -11,9 +11,10 @@ func init() { } var nowPlayingCmd = &cobra.Command{ - Use: "nowplaying", - Short: "Shows song and artist of currently playing song", - Long: `Shows song and artist of currently playing song, useful for scripting`, + Use: "nowplaying", + Aliases: []string{"now"}, + Short: "Shows song and artist of currently playing song", + Long: `Shows song and artist of currently playing song, useful for scripting`, Run: func(cmd *cobra.Command, args []string) { commands.NowPlaying(ctx, client) }, diff --git a/src/cmd/pause.go b/src/cmd/pause.go index 13209f1..1564f7d 100644 --- a/src/cmd/pause.go +++ b/src/cmd/pause.go @@ -11,9 +11,10 @@ func init() { } var pauseCmd = &cobra.Command{ - Use: "pause", - Short: "Pauses spotify", - Long: `Pauses currently playing song on spotify`, + Use: "pause", + Short: "Pauses spotify", + Aliases: []string{"pa"}, + Long: `Pauses currently playing song on spotify`, Run: func(cmd *cobra.Command, args []string) { commands.Pause(ctx, client) }, diff --git a/src/cmd/play.go b/src/cmd/play.go index d5bd04d..4c3dd11 100644 --- a/src/cmd/play.go +++ b/src/cmd/play.go @@ -12,7 +12,7 @@ func init() { var playCmd = &cobra.Command{ Use: "play", - Aliases: []string{"p"}, + Aliases: []string{"pl", "start", "s"}, Short: "Plays spotify", Long: `Plays queued song on spotify, uses last used device and activates it if needed`, Run: func(cmd *cobra.Command, args []string) { diff --git a/src/cmd/previous.go b/src/cmd/previous.go index a55adda..f9e5e75 100644 --- a/src/cmd/previous.go +++ b/src/cmd/previous.go @@ -12,7 +12,7 @@ func init() { var previousCmd = &cobra.Command{ Use: "previous", - Aliases: []string{"b"}, + Aliases: []string{"b", "prev", "back"}, Short: "goes to previous song", Long: `if song is playing it will start over, if close to begining of song it will go to previous song`, Run: func(cmd *cobra.Command, args []string) {