diff --git a/README.md b/README.md index 8b82eea..22d706b 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,11 @@ A cli util for creating nostr events ## Usage - usage: nostril [OPTIONS] --content + usage: nostril [OPTIONS] OPTIONS + --content the content of the note --dm make an encrypted dm to said pubkey. sets kind and tags. --envelope wrap in ["EVENT",...] for easy relaying --kind set kind diff --git a/nostril.c b/nostril.c index 4c34d92..40ef4a1 100644 --- a/nostril.c +++ b/nostril.c @@ -69,10 +69,11 @@ struct nostr_event { void usage() { - printf("usage: nostril [OPTIONS] --content \n"); + printf("usage: nostril [OPTIONS]\n"); printf("\n"); printf(" OPTIONS\n"); printf("\n"); + printf(" --content the content of the note\n"); printf(" --dm make an encrypted dm to said pubkey. sets kind and tags.\n"); printf(" --envelope wrap in [\"EVENT\",...] for easy relaying\n"); printf(" --kind set kind\n"); @@ -476,10 +477,8 @@ static int parse_args(int argc, const char *argv[], struct args *args, struct no } } - if (!args->content) { - fprintf(stderr, "expected --content\n"); - return 0; - } + if (!args->content) + args->content = ""; return 1; }