support reading from stdin.

This commit is contained in:
fiatjaf
2023-10-20 20:57:29 -03:00
parent 459b127988
commit 208d909727
3 changed files with 35 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ var fetch = &cli.Command{
ArgsUsage: "[nip19code]",
Action: func(c *cli.Context) error {
filter := nostr.Filter{}
code := c.Args().First()
code := getStdinOrFirstArgument(c)
prefix, value, err := nip19.Decode(code)
if err != nil {