-
Notifications
You must be signed in to change notification settings - Fork 0
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
Prompt the user for a value for the category, if none was given #7
base: master
Are you sure you want to change the base?
Conversation
I don't like the prompt if missing, I'd rather this threw an error (but I'll let @dotsdl @kain88-de weigh in too) |
My motivation for this is that there is a huge barrier to entry into using This functionality would make it easy to go and add a bunch of new categories to already existing bundles, while being dynamically prompted for the value. Are you against such a feature in general or do you just dislike the "prompt if missing" stuff? If its the latter, we could also think about doing this with some other option. |
I guess I think of a cli as also being useful for scripting. The user prompts would cause a script to hang if you got a k:v pair wrong. And then the idea that datreant is for organising more data than you could do manually, so the idea of adding manual prompts to the system seems strange. But this is all opinion based, so I'll let someone else slap me down if they like this idea |
I totally see your point. Maybe keeping the current functionality is better, as it would do one thing, and one thing only. Nevertheless, I still think that is something that other people would also like to have, maybe via Looking forward to the others' insights. |
I'm in agreement with @richardjgowers: I think the usage you illustrated deserves an informative error message instead, since it looks to me like mistaken usage. Can we put out a good error message instead for this case of |
I'm fine with that! But in any case, do you two see any possibility of having some interactive prompt in the CLI at all? At least for specialized functions that are advertised to do this. I've been migrating old non-datreant projects to datreant in the past few days and the functionality from this PR has sped up things so much for me. |
@mimischi as a compromise, how about a |
There was already a suggestion to add an interactive sub command. I think
it might be a good idea to have a special interactive command to do this.
We could extend this in the future as well.
…On Thu 1. Nov 2018 at 22:54, Richard Gowers ***@***.***> wrote:
@mimischi <https://github.com/mimischi> as a compromise, how about a
--interactive flag, which kills the error and allows for prompts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEGnVosxe42bKovA3u7jEpprwyQTXX92ks5uq218gaJpZM4XWMyU>
.
|
Yes, so this then goes in the same direction as #8. We should think about a reasonable CLI to not confuse users and provide them with a logical separation. I haven't thought about which of the two options is best. |
We can now do a)
dtr update --category CATEGORY1:VALUE1 CATEGORY2:VALUE2
and b)dtr update --category CATEGORY1 CATEGORY2
. In the first case, the values for both keysCATEGORY1
andCATEGORY2
are updated immediately. In the second case, the user is prompted for values first.Resolves #6.