summaryrefslogtreecommitdiffstats
path: root/cmd/reddit.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/reddit.go')
-rw-r--r--cmd/reddit.go76
1 files changed, 42 insertions, 34 deletions
diff --git a/cmd/reddit.go b/cmd/reddit.go
index bb31336..7a5da71 100644
--- a/cmd/reddit.go
+++ b/cmd/reddit.go
@@ -7,61 +7,69 @@ import (
)
var redditCmd = &cobra.Command{
- Use: "reddit",
- Short: "Reddit data retrieval tools",
- Long: `Retrieve posts, comments, and user information from Reddit`,
+ Use: "reddit",
+ Aliases: []string{"rd"},
+ Short: "Reddit data retrieval tools",
+ Long: `Retrieve posts, comments, and user information from Reddit`,
}
var redditSubredditCmd = &cobra.Command{
- Use: "subreddit",
- Short: "Get subreddit data",
- Long: `Retrieve posts or comments from a subreddit`,
+ Use: "subreddit",
+ Aliases: []string{"sr"},
+ Short: "Get subreddit data",
+ Long: `Retrieve posts or comments from a subreddit`,
}
var redditUserCmd = &cobra.Command{
- Use: "user",
- Short: "Get Reddit user data",
- Long: `Retrieve posts, comments, or profile information for a Reddit user`,
+ Use: "user",
+ Aliases: []string{"u"},
+ Short: "Get Reddit user data",
+ Long: `Retrieve posts, comments, or profile information for a Reddit user`,
}
var redditSubredditPostsCmd = &cobra.Command{
- Use: "posts [subreddit]",
- Short: "Get subreddit posts",
- Long: `Get up to 1000 recent posts from a subreddit`,
- Args: cobra.ExactArgs(1),
- RunE: runRedditSubredditPosts,
+ Use: "posts [subreddit]",
+ Aliases: []string{"p"},
+ Short: "Get subreddit posts",
+ Long: `Get up to 1000 recent posts from a subreddit`,
+ Args: cobra.ExactArgs(1),
+ RunE: runRedditSubredditPosts,
}
var redditSubredditCommentsCmd = &cobra.Command{
- Use: "comments [subreddit]",
- Short: "Get subreddit comments",
- Long: `Get up to 1000 recent comments from a subreddit`,
- Args: cobra.ExactArgs(1),
- RunE: runRedditSubredditComments,
+ Use: "comments [subreddit]",
+ Aliases: []string{"c"},
+ Short: "Get subreddit comments",
+ Long: `Get up to 1000 recent comments from a subreddit`,
+ Args: cobra.ExactArgs(1),
+ RunE: runRedditSubredditComments,
}
var redditUserPostsCmd = &cobra.Command{
- Use: "posts [username]",
- Short: "Get user posts",
- Long: `Get up to 1000 recent posts from a Reddit user`,
- Args: cobra.ExactArgs(1),
- RunE: runRedditUserPosts,
+ Use: "posts [username]",
+ Aliases: []string{"p"},
+ Short: "Get user posts",
+ Long: `Get up to 1000 recent posts from a Reddit user`,
+ Args: cobra.ExactArgs(1),
+ RunE: runRedditUserPosts,
}
var redditUserCommentsCmd = &cobra.Command{
- Use: "comments [username]",
- Short: "Get user comments",
- Long: `Get up to 1000 recent comments from a Reddit user`,
- Args: cobra.ExactArgs(1),
- RunE: runRedditUserComments,
+ Use: "comments [username]",
+ Aliases: []string{"c"},
+ Short: "Get user comments",
+ Long: `Get up to 1000 recent comments from a Reddit user`,
+ Args: cobra.ExactArgs(1),
+ RunE: runRedditUserComments,
}
var redditUserAboutCmd = &cobra.Command{
- Use: "about [username]",
- Short: "Get user profile",
- Long: `Get profile information for a Reddit user`,
- Args: cobra.ExactArgs(1),
- RunE: runRedditUserAbout,
+ Use: "about [username]",
+ Aliases: []string{"a"},
+ Short: "Get user profile",
+ Long: `Get profile information for a Reddit user`,
+ Args: cobra.ExactArgs(1),
+ RunE: runRedditUserAbout,
}
func init() {