NLnetLabs / dnsi

A tool to investigate the DNS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can be unique command possible to be shortened?

pemensik opened this issue · comments

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.

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.

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.

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.