- Add command groups (Getting Started, Search, Downloads, Daemon, System) - Add shell completion command (bash, zsh, fish, powershell) - Add flag completions for --type, --quality, --sort, --lang, --genre, --country, --method, --player - Improve Long descriptions and Examples for all commands - Split doctor disk check into platform-specific files (Unix/Windows) - Validate infoHash length before truncating (prevent panic) - Fix references to non-existent 'unarr daemon start' command - Move stats command to System & Diagnostics group - Rewrite README with complete documentation, correct config format (toml not yaml), all commands, shell completion section
14 lines
621 B
Go
14 lines
621 B
Go
package cmd
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
// completionCountryCodes provides shell completion for --country flags.
|
|
func completionCountryCodes(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
|
return []string{
|
|
"US\tUnited States", "GB\tUnited Kingdom", "ES\tSpain", "FR\tFrance",
|
|
"DE\tGermany", "IT\tItaly", "PT\tPortugal", "BR\tBrazil",
|
|
"MX\tMexico", "AR\tArgentina", "CA\tCanada", "AU\tAustralia",
|
|
"NL\tNetherlands", "SE\tSweden", "NO\tNorway", "DK\tDenmark",
|
|
"FI\tFinland", "JP\tJapan", "KR\tSouth Korea", "IN\tIndia",
|
|
}, cobra.ShellCompDirectiveNoFileComp
|
|
}
|