In https://github.com/ipfs/go-ipfs/pull/2785, @Kubuxu and I are discussing the best way to outline synopses for go-ipfs.
@Kubuxu:
...we should change options like: --pin to --no-pin or --progress to --no-progress and so on. I had no idea for a long time that you could do --pin=false.
I agree with this. I didn't know that --pin=false was an option (or I forgot).
I think that setting the flags and options to --no-pin makes more sense and is more intuitive. Git does this, too:
NAME
git-add - Add file contents to the index
SYNOPSIS
git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
[--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
[--] [<pathspec>...]
See --[no-]ignore-removal?
What do you think?
We could make it so all boolean options have no counterparts. So there is --pin, --no-pin and also option to do --pin=false for sake of compatibility.
As it touches same code as: https://github.com/ipfs/go-ipfs/pull/2785 I am adding it in the same PR (no conflicts this way).
mmm... we decided explicitly against this a while back, and opted instead for the --opt=false style options
I don't know what was the reason previously. Currently, knowing default values, and having synopsis generator I really don't see any disadvantages.
@jbenet @lgierth thoughts here?
We have decided against it.
@Kubuxu is this reason documented anywhere?
@Kubuxu Can you explain why? Where was it discussed?
I talked with @jbenet about it, he said that he will explain it latter here.
always prefer --option over --no-option, its much clearer and better UX
Most helpful comment
We could make it so all boolean options have
nocounterparts. So there is--pin,--no-pinand also option to do--pin=falsefor sake of compatibility.