Open JesseWeinstein opened 8 years ago
I'm interested in working on this, but I'm not sure when I'll get to it.
Hi, I'm looking to contribute to ipfs and this seems like a fairly simple issue to start familiarizing myself with the codebase. It seems to me that the optionsMap check in commands/command.go GetOptions will disallow refs and its subcommand local from using the option names since it traverses the cmd path and adds the available options at each point to the map... Am I missing something or would "refs local" need to be renamed (something like) "refs-local" in order to use the same options/flags as regular "refs"
@ryco117 I think the best way to resolve this issue would be to simply duplicate some of the flags from ipfs refs
into ipfs refs local
. You don't want all of them (for example, -r and -u don't really make sense) but some of them would be good.
@whyrusleeping Hi, thanks for the response. Duplicating the args is exactly what I did, but refs local
was rendered unusable since it triggered the return nil, fmt.Errorf("Option name '%s' used multiple times", name)
in commands/command.go . This is because GetOptions "returns the options in the given path of commands" and doesn't seem to like the same args appearing multiple times in the cmd tree. Any clarification would be highly appreciated
Type: feature Area: commands Priority: P0
It would be nice for
ipfs refs local
to take the same options asipfs refs
. You can jury-rig the effect by combining existing commands, but it'd be nicer if using the options just worked.