ipfs / ipfs/kubo

Misleding helptext assembled when `.EnableStdin()` is active

Open
#8,221 4 comments 0 reactions 0 assignees View on GitHub
kind/bug P2 status/ready
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Description:
This is really a deficiency in `go-ipfs-cmds` but raising it against `go-ipfs` for visibility.

When `EnableStdin` is active on an argument, the helptext does not make it clear that the argument is optional. This anecdotally managed to confuse @rvagg indicating that `go dag import` will not take a STDIN stream.

Suggestion is to change the current:

Head is elsewhere, I pasted the wrong thing 🤦

```
~$ ipfs cat --help
USAGE
ipfs cat ... - Show IPFS object data.
...
```
to
```
~$ ipfs cat --help
USAGE
ipfs cat [...] - Show IPFS object data.
...
```

```
~$ ipfs dag import --help
USAGE
ipfs dag import ... - Import the contents of .car files
```
to

```
~$ ipfs dag import --help
USAGE
ipfs dag import [...] - Import the contents of .car files
```

This would make things consistent with e.g.
```
~$ ipfs pin --help
USAGE
ipfs pin - Pin (and unpin) objects to local storage.

SYNOPSIS
ipfs pin

SUBCOMMANDS
ipfs pin add ... - Pin objects to local storage.
ipfs pin ls []... - List objects pinned to local storage.
...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.