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

Uses a help tokens array to replace tokens in help text #255

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nkakouros
Copy link

@nkakouros nkakouros commented Sep 28, 2019

cc: @mbland

The --help-filter option and the # Help filter comment is too much for the user for sth that they may need to implement in every command script they write. Also, it limits a bit some use cases, for instance using docopts together with go-script-bash.

This PR adds a new associative array _GO_HELP_TOKENS. Each item in the array is a token=>replacement pair and go-script-bash automatically performs any replacements when generating the help text. This is complementary to the --help-filter method, which is compatible with old bash versions.

@nkakouros nkakouros requested a review from mbland as a code owner September 28, 2019 21:42
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 95.031% when pulling b34c9d4 on nkakouros-forks:help-tokens into 292e080 on mbland:master.

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