mirror of
https://github.com/jb55/nostril.git
synced 2024-11-21 16:29:06 -05:00
add -t hashtag helper
This commit is contained in:
parent
02ab7a19d1
commit
1904c78efa
|
@ -85,6 +85,7 @@ void usage()
|
||||||
printf(" --tag <key> <value> add a tag\n");
|
printf(" --tag <key> <value> add a tag\n");
|
||||||
printf(" -e <event_id> shorthand for --tag e <event_id>\n");
|
printf(" -e <event_id> shorthand for --tag e <event_id>\n");
|
||||||
printf(" -p <pubkey> shorthand for --tag p <pubkey>\n");
|
printf(" -p <pubkey> shorthand for --tag p <pubkey>\n");
|
||||||
|
printf(" -t <hashtag> shorthand for --tag t <hashtag>\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,6 +475,13 @@ static int parse_args(int argc, const char *argv[], struct args *args, struct no
|
||||||
fprintf(stderr, "couldn't add p tag");
|
fprintf(stderr, "couldn't add p tag");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(arg, "-t")) {
|
||||||
|
has_added_tags = 1;
|
||||||
|
arg = *argv++; argc--;
|
||||||
|
if (!nostr_add_tag(ev, "t", arg)) {
|
||||||
|
fprintf(stderr, "couldn't add t tag");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
} else if (!strcmp(arg, "--tag")) {
|
} else if (!strcmp(arg, "--tag")) {
|
||||||
has_added_tags = 1;
|
has_added_tags = 1;
|
||||||
if (args->tags) {
|
if (args->tags) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user