[feature] Allow users to search by name or ip#100
Conversation
|
it's super easy to automatically detect whether the string is an ip or a name (i.e., just check for the presence of a |
|
@maxhodak good point I'll update it to be uri |
|
Funny enough I had that in the previous version lol |
|
are there reasons to make it a flag rather than positional? first argument could just always be uri; you always need one, and it changes less often than the method you're calling (which should be the second positional argument) |
|
@maxhodak I thought that as well, but there are actually commands that don't need a uri, like discover and plot. I mentioned this to @namthor9 but it isn't super clean to support the conditional synapsectl because we also support commands that don't need a uri (but since they are all the same entry point, anything where we have a positional arguments will be interpreted as a subcommand). I figure that the extra --uri is a decent compromise. |
|
And to be explicit, the reason why people want that ordering is because then you can easily do from the terminal: rather than moving back and switching the command. |
|
oh i see, basically if the first argument is not command then none of the arguments can be positional anymore. so we are weighing having to type |
|
Yes. This was a suggestion from a few of our internal users, but if there is more elegant way to solve this then I'm all ears |
|
We could take the time to make a more proper and persistent TUI. |
|
ok don't let me hold this up |
AFAIK you can still do without |
polymerizedsage
left a comment
There was a problem hiding this comment.
Tested locally and this works for me. Some small comments but otherwise lgtm
I can't reproduce this with the start command.
|
|
@polymerizedsage but also I can't reproduce that with read, it just fails. So I'm not sure how you got that working |
Summary
Users have requested that it would be nice to just search by the device name, not only the IP. This removes the uri positional arguments for the CLI and adds the option of --uri with either or
Usage