cmd/toot.go
changeset 35 61ed03c3f134
parent 17 ab1aa9652791
child 44 6da40ca4534c
--- a/cmd/toot.go	Sun Apr 30 11:11:38 2017 +0200
+++ b/cmd/toot.go	Sun Apr 30 15:24:08 2017 +0200
@@ -25,6 +25,12 @@
 	tootAliasCmd.Flags().StringVarP(&statusOpts.mediaFilePath, "file", "f", "", "Media attachment file name")
 	tootAliasCmd.Flags().StringVar(&statusOpts.textFilePath, "text-file", "", "Text file name (message content)")
 	tootAliasCmd.Flags().IntVarP(&statusOpts.inReplyToID, "in-reply-to", "r", 0, "Status ID to reply to")
+
+	// Flag completion
+	annotation := make(map[string][]string)
+	annotation[cobra.BashCompCustom] = []string{"__madonctl_visibility"}
+
+	tootAliasCmd.Flags().Lookup("visibility").Annotations = annotation
 }
 
 var tootAliasCmd = &cobra.Command{