63 statusPostSubcommand.Flags().StringVarP(&statusOpts.mediaFilePath, "file", "f", "", "Media file name") |
64 statusPostSubcommand.Flags().StringVarP(&statusOpts.mediaFilePath, "file", "f", "", "Media file name") |
64 statusPostSubcommand.Flags().StringVar(&statusOpts.textFilePath, "text-file", "", "Text file name (message content)") |
65 statusPostSubcommand.Flags().StringVar(&statusOpts.textFilePath, "text-file", "", "Text file name (message content)") |
65 statusPostSubcommand.Flags().Int64VarP(&statusOpts.inReplyToID, "in-reply-to", "r", 0, "Status ID to reply to") |
66 statusPostSubcommand.Flags().Int64VarP(&statusOpts.inReplyToID, "in-reply-to", "r", 0, "Status ID to reply to") |
66 statusPostSubcommand.Flags().BoolVar(&statusOpts.stdin, "stdin", false, "Read message content from standard input") |
67 statusPostSubcommand.Flags().BoolVar(&statusOpts.stdin, "stdin", false, "Read message content from standard input") |
67 statusPostSubcommand.Flags().BoolVar(&statusOpts.addMentions, "add-mentions", false, "Add mentions when replying") |
68 statusPostSubcommand.Flags().BoolVar(&statusOpts.addMentions, "add-mentions", false, "Add mentions when replying") |
|
69 statusPostSubcommand.Flags().BoolVar(&statusOpts.sameVisibility, "same-visibility", false, "Use same visibility as original message (for replies)") |
68 |
70 |
69 // Flag completion |
71 // Flag completion |
70 annotation := make(map[string][]string) |
72 annotation := make(map[string][]string) |
71 annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"} |
73 annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"} |
72 |
74 |
73 statusPostSubcommand.Flags().Lookup("visibility").Annotations = annotation |
75 statusPostSubcommand.Flags().Lookup("visibility").Annotations = annotation |
|
76 |
|
77 // This one will be used to check if the options were explicitly set or not |
|
78 updateFlags = statusPostSubcommand.Flags() |
74 } |
79 } |
75 |
80 |
76 // statusCmd represents the status command |
81 // statusCmd represents the status command |
77 // This command does nothing without a subcommand |
82 // This command does nothing without a subcommand |
78 var statusCmd = &cobra.Command{ |
83 var statusCmd = &cobra.Command{ |