60 statusPostSubcommand.Flags().StringVar(&statusOpts.mediaIDs, "media-ids", "", "Comma-separated list of media IDs") |
61 statusPostSubcommand.Flags().StringVar(&statusOpts.mediaIDs, "media-ids", "", "Comma-separated list of media IDs") |
61 statusPostSubcommand.Flags().StringVarP(&statusOpts.mediaFilePath, "file", "f", "", "Media file name") |
62 statusPostSubcommand.Flags().StringVarP(&statusOpts.mediaFilePath, "file", "f", "", "Media file name") |
62 statusPostSubcommand.Flags().StringVar(&statusOpts.textFilePath, "text-file", "", "Text file name (message content)") |
63 statusPostSubcommand.Flags().StringVar(&statusOpts.textFilePath, "text-file", "", "Text file name (message content)") |
63 statusPostSubcommand.Flags().Int64VarP(&statusOpts.inReplyToID, "in-reply-to", "r", 0, "Status ID to reply to") |
64 statusPostSubcommand.Flags().Int64VarP(&statusOpts.inReplyToID, "in-reply-to", "r", 0, "Status ID to reply to") |
64 statusPostSubcommand.Flags().BoolVar(&statusOpts.stdin, "stdin", false, "Read message content from standard input") |
65 statusPostSubcommand.Flags().BoolVar(&statusOpts.stdin, "stdin", false, "Read message content from standard input") |
|
66 statusPostSubcommand.Flags().BoolVar(&statusOpts.addMentions, "add-mentions", false, "Add mentions when replying") |
65 |
67 |
66 // Flag completion |
68 // Flag completion |
67 annotation := make(map[string][]string) |
69 annotation := make(map[string][]string) |
68 annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"} |
70 annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"} |
69 |
71 |
161 Short: "Post a message (same as 'madonctl toot')", |
163 Short: "Post a message (same as 'madonctl toot')", |
162 Example: ` madonctl status post --spoiler Warning "Hello, World" |
164 Example: ` madonctl status post --spoiler Warning "Hello, World" |
163 madonctl status toot --sensitive --file image.jpg Image |
165 madonctl status toot --sensitive --file image.jpg Image |
164 madonctl status post --media-ids ID1,ID2,ID3 Image |
166 madonctl status post --media-ids ID1,ID2,ID3 Image |
165 madonctl status toot --text-file message.txt |
167 madonctl status toot --text-file message.txt |
|
168 madonctl status post --in-reply-to STATUSID "@user response" |
|
169 madonctl status post --in-reply-to STATUSID --add-mentions "response" |
166 echo "Hello from #madonctl" | madonctl status toot --stdin |
170 echo "Hello from #madonctl" | madonctl status toot --stdin |
167 |
171 |
168 The default visibility can be set in the configuration file with the option |
172 The default visibility can be set in the configuration file with the option |
169 'default_visibility' (or with an environmnent variable).`, |
173 'default_visibility' (or with an environmnent variable).`, |
170 RunE: func(cmd *cobra.Command, args []string) error { |
174 RunE: func(cmd *cobra.Command, args []string) error { |