Closed MasterOdin closed 4 years ago
Would it make sense to allow one to always be able to specify the space?
There seem to be at least two issues:
git-cherry-pick
), and tldr
would have to check all possible hyphen combos (easy).git-patch-id
. If you run man git-patch-id
, you get the man page of this particular git
command, but if you run man git patch id
, it shows you 3 different man
pages since the 3 programs exist independently, so if no-hyphen-support is implemented in tldr
as in man
, sometimes the user may not get what they expect.For the record, the official command name is ansible-galaxy
(with a hyphen) as you can see in ansible-galaxy.md
.
Though this function may be useful, it is impossible to implement it functionally (as @JCGoran nicely explained). It is also in conflict with the official client specification, as it makes the hyphen insertion ambiguous.
I'm closing this for now. If other collaborators see some special way to actually implement this, this issue should be reopened.
@zdroid while I agree that it is unlikely that we'll be able to support showing pages for multiple commands with a single invocation of tldr (without making that ambiguous with hiphenated commands, that is), the fact is that the Python client already implements this behavior, as @MasterOdin mentions in the opening comment.
So if anything, this issue should remain open to track the removal of that functionality from this client, for the reasons you and @JCGoran raised above.
I didn't see that aspect, but you are right. This issue is a good thread for the removal of this conflicting feature.
The python client allows one to specify multiple commands to show their pages at the same time, for example
tldr wget curl
, which will show you bothwget
andcurl
.Additionally, it allows you to specify a command without specifying its hyphen, for example
tldr ansible galaxy
is equivalent totldr ansible-galaxy
.If trying to specify multiple commands, you cannot look at commands that have hyphens and use the above syntax (you must specify the hyphen).
Example:
tldr ansible ansible galaxy
ortldr ansible galaxy ansible
I'd expect to see the
ansible-galaxy
page and theansible
page. Instead, it shows theansible
page twice and a warning about how thegalaxy
page does not exist and I should consider creating one.It looks like if you wish to use spaces for a command's name, you must use the hyphen. Would it make sense to allow one to always be able to specify the space?
edit (04/23/2020):
For a better example of confusing behavior, typing
tldr git grep
returnsgit-grep
but did the user mean that or to get back bothgit
andgrep
separately?