From d57c3ba06e1e661b650a07fd3dc66b2e20dd8daa Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Jul 2022 22:55:45 +0530 Subject: added flags to modify prompt length and search results length --- cmd/chapters.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/chapters.go') 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)") } -- cgit v1.2.3