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

Erb might not be the best way to build shell scripts #4

Open
kke opened this issue Jan 9, 2019 · 0 comments
Open

Erb might not be the best way to build shell scripts #4

kke opened this issue Jan 9, 2019 · 0 comments

Comments

@kke
Copy link
Contributor

kke commented Jan 9, 2019

Difficult to test, indent and build.

Perhaps switch from erb to some sort of builder class.

Perhaps a separate gem that can be used for other CLI frameworks also, perhaps sparking interest and PR's from more people than the rather small userbase of clamp.

Something like

builder = CompletionBuilder.new
sc = builder.subcommand 'foo', 'foo related functionality'
sc.flag %w(-d --debug), "enable debug"
sc.option %w(-c --config), "configuration file", glob: '*.yml'
builder.to_bash
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

No branches or pull requests

1 participant