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

Teletype: inconsistent file naming in case a module's named with a dash #43

Closed
msg7086 opened this issue May 17, 2018 · 6 comments
Closed

Comments

@msg7086
Copy link

msg7086 commented May 17, 2018

teletype new a-b
a-b/lib/a/b/cli.rb
a-b/lib/a-b/commands/.gitkeep

I assume this is not correct.

@msg7086
Copy link
Author

msg7086 commented May 17, 2018

Also module A-b in the code.

Or I suppose I should not name my application with a dash?

@piotrmurach
Copy link
Owner

Hi Xinyue,

Thanks for trying the gem out. I would say that this a bug and I will look into it unless you have time to contribute?

As far as executables go I cannot recall easily any Unix utility that has a dash in its name... I think if you were to have a dash, it would make it a bit difficult for people to use. However, it doesn't mean that this gem shouldn't support nested module names. I can imagine a situation where running new generator creates a different name for the exec file(even for single names):

teletype new foo-bar-baz --name foo

teletype new bundler --name bundle

@msg7086
Copy link
Author

msg7086 commented May 18, 2018

Unfortunately I later figured out TTY was not what I'm going to use (I went to arguments style instead) but I thought I should still let you know if it's an unexpected behavior.

A lot of tools have dash in their names. redis-cli, ssh-keygen, transmission-create, just to name a few. In my case, I wrote a small SDK library, and would like to create a command line tool for it, thus naturally be named as whateversdk-tools.

A different name for the binary is a good point. I can name it whatever-cli or even whatever.

@piotrmurach
Copy link
Owner

Again, thanks for raising the issue! Agree there are tools with dashes and it's totally up to you what you prefer. My preference is to stay away from long-winded and cumbersome names such as redis-cli and expose users to more concise and short names. Each to their own as they say 😄

@piotrmurach
Copy link
Owner

Fixed main cli generation to allow for namespaced application names 5312026

@piotrmurach
Copy link
Owner

This is fixed :shipit:

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

2 participants