Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow subcommands for some commands #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

m42e
Copy link

@m42e m42e commented Oct 4, 2018

Support subcommands for e.g. git like git status which have their own man pages.

@carlbordum
Copy link
Owner

So far, I have invoked commands with hyphens (manly git-branch ...) to use manly for subcommands. I am considering if this is better.

This is a high quality patch and I appreciate your interest in improving the project. Do you think there are other solutions than maintaining a list of commands that have sub commands?

@m42e
Copy link
Author

m42e commented Oct 4, 2018

I already thought about it, but I haven’t had a idea that was simple but works well.

  • There is no common syntax in makefiles for this case
  • A config file would not be a good option imho
  • A try error would be possible but increase runtime (may be the best option)

What do you think?

@carlbordum
Copy link
Owner

I mean we could try concatenating the words starting without hyphens first and then go for the regular manpage if that fails. This feels a little bit icky to me (but please object, if you think otherwise!), so I'm inclined to go with your original proposal or print a warning to stderr when the user types a command with multiple words in row without hyphens.

@m42e
Copy link
Author

m42e commented Oct 6, 2018

What do you think about Häsin ganz environment variable and set it to the values I entered as default?

@carlbordum
Copy link
Owner

I'm sorry, but I dont understand your comment :D

@m42e
Copy link
Author

m42e commented Oct 8, 2018

Sorry that was my fault, or the iOS autocorrection feature

What do you think of defining the commands that use subcommands as an environment variable. The default could still be the ones I added, but it is up to the user to redefine or extend the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants