diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-07-03 22:55:45 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-07-03 22:55:45 +0530 |
commit | d57c3ba06e1e661b650a07fd3dc66b2e20dd8daa (patch) | |
tree | efb7bb80e55872410071332575c6e0286ae8618f /cmd | |
parent | 7e512b17f64b85390e189754081fb9a7994cd083 (diff) |
added flags to modify prompt length and search results length
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/chapters.go | 4 | ||||
-rw-r--r-- | cmd/episodes.go | 4 | ||||
-rw-r--r-- | cmd/score.go | 5 | ||||
-rw-r--r-- | cmd/status.go | 5 |
4 files changed, 18 insertions, 0 deletions
diff --git a/cmd/chapters.go b/cmd/chapters.go index ae2596f..aa91a85 100644 --- a/cmd/chapters.go +++ b/cmd/chapters.go @@ -85,4 +85,8 @@ var chaptersCmd = &cobra.Command{ func init() { rootCmd.AddCommand(chaptersCmd) chaptersCmd.Flags().StringP("set-value", "s", "", "Number of chapters") + chaptersCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt") + chaptersCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load") + chaptersCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results") + chaptersCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)") } diff --git a/cmd/episodes.go b/cmd/episodes.go index df5c960..96a28f0 100644 --- a/cmd/episodes.go +++ b/cmd/episodes.go @@ -87,4 +87,8 @@ var episodesCmd = &cobra.Command{ func init() { rootCmd.AddCommand(episodesCmd) episodesCmd.Flags().StringP("set-value", "s", "", "Number of episodes") + episodesCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt") + episodesCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)") + episodesCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load") + episodesCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results") } diff --git a/cmd/score.go b/cmd/score.go index 33c02c3..b9e87a4 100644 --- a/cmd/score.go +++ b/cmd/score.go @@ -145,4 +145,9 @@ func setMangaScore(scoreInput, searchInput string) { func init() { rootCmd.AddCommand(scoreCmd) scoreCmd.Flags().StringP("set-value", "s", "", "Score to be set") + scoreCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt") + scoreCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load") + scoreCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results") + scoreCmd.PersistentFlags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode") + scoreCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)") } diff --git a/cmd/status.go b/cmd/status.go index e412a96..3dc056f 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -124,4 +124,9 @@ func setMangaStatus(statusInput, searchInput string) { func init() { rootCmd.AddCommand(statusCmd) statusCmd.Flags().StringP("set-value", "s", "", "status to be set") + statusCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt") + statusCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load") + statusCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results") + statusCmd.PersistentFlags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode") + statusCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)") } |