From 8fb49796e37d2bf955d8ffa521f6bcda4f36b766 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 2 Oct 2022 20:46:50 +0530 Subject: Automatically select nth search result with --auto-select flag --- cmd/chapters.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/chapters.go') diff --git a/cmd/chapters.go b/cmd/chapters.go index f8c3414..15e2169 100644 --- a/cmd/chapters.go +++ b/cmd/chapters.go @@ -50,6 +50,7 @@ var chaptersCmd = &cobra.Command{ mal.SearchLength = conf.SearchLength mal.SearchOffset = conf.SearchOffset mal.SearchNSFW = conf.SearchNSFW + mal.AutoSel = conf.AutoSel ui.PromptLength = conf.PromptLength mal.Init() @@ -104,6 +105,7 @@ func init() { chaptersCmd.Flags().IntVarP(&entryId, "id", "i", -1, "Manually specify the ID of anime/manga (overrides search)") chaptersCmd.Flags().StringVarP(&mal.Secret, "authentication-token", "t", "", "MyAnimeList authentication token to use (overrides system keyring if any)") + chaptersCmd.Flags().IntP("auto-select", "S", 0, "Automatically select nth value") chaptersCmd.Flags().IntP("prompt-length", "l", 5, "Length of select prompt") chaptersCmd.Flags().IntP("search-length", "n", 10, "Amount of search results to load") chaptersCmd.Flags().IntP("search-offset", "o", 0, "Offset for the search results") -- cgit v1.2.3