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

Can be unique command possible to be shortened? #14

Open
pemensik opened this issue May 11, 2024 · 3 comments
Open

Can be unique command possible to be shortened? #14

pemensik opened this issue May 11, 2024 · 3 comments

Comments

@pemensik
Copy link

typing dnsi query example.com is unnecessary tiring. I would prefer, if just dnsi q example.com were possible, especially when number of unique commands are low and just first letter is enough to choose correct command.

Maybe even better to have one of them default (query?) and switch to different modes via --arguments? Similar to what dig, host and similar tools use.

@tertsdiepraam
Copy link
Contributor

A downside to having this behaviour is that it makes it harder to add new commands without breaking scripts. We now have dnsi lookup, but maybe we want dnsi list in the future, which would make dnsi l ambiguous. I'd therefore propose to only have explicit abbreviations. So q would be an explicit alias for query and if we'd add another command with q, it would still work.

@ximon18
Copy link
Member

ximon18 commented May 13, 2024

I am also not in favour of adding --arguments to address ala dig etc this as one of the problems with dig is the large number of command line arguments is (IMO) confusing, I would rather have (as we have now) separate command groups with their own applicable arguments.

@pemensik
Copy link
Author

For any scripts it would be of course safer to type whole command. I am not proposing complete command should not be supported anymore. dig has this algorithm used for +opts. For example following is valid: dig +noal +qu example.com, when it means dig +noall +question example.com. But it won't accept dig +q, because that is not unique enough. Also won't accept dig +questionextratext. Should be simple to implement if command handlers can reside in tree-like structure.

It depends what dnsi is supposed to be. If it should not have many features, then --parameter style options can be avoided. At cost of features. If it should be general DNS tool similar to dig, then no. It is not going to stay simple with just few commands and without extra parameters. I doubt creating its unique parameters style would be useful in the end.

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

3 participants