mirror of
https://github.com/onyx-and-iris/ignr.git
synced 2026-04-18 07:13:33 +00:00
replace huh with promptui
- it gives more control over filtering add --filter/-f flag, this allows configuration over a prefix vs contains filter update the README to reflect changes
This commit is contained in:
3
main.go
3
main.go
@@ -55,6 +55,8 @@ You may also list available templates and generate .gitignore files based on tho
|
||||
func init() {
|
||||
rootCmd.PersistentFlags().StringP("token", "t", "", "GitHub authentication token")
|
||||
rootCmd.PersistentFlags().IntP("height", "H", 20, "Height of the selection prompt")
|
||||
rootCmd.PersistentFlags().
|
||||
StringP("filter", "f", "startswith", "Type of filter to apply to the list of templates (e.g., 'startswith', 'contains')")
|
||||
|
||||
rootCmd.Flags().BoolP("version", "v", false, "Print the version of the CLI")
|
||||
|
||||
@@ -62,6 +64,7 @@ func init() {
|
||||
viper.AutomaticEnv()
|
||||
viper.BindPFlag("token", rootCmd.PersistentFlags().Lookup("token"))
|
||||
viper.BindPFlag("height", rootCmd.PersistentFlags().Lookup("height"))
|
||||
viper.BindPFlag("filter", rootCmd.PersistentFlags().Lookup("filter"))
|
||||
}
|
||||
|
||||
// main is the entry point of the application.
|
||||
|
||||
Reference in New Issue
Block a user