the-littlest-jupyterhub
the-littlest-jupyterhub copied to clipboard
`tljh-config set` with a list as value
At the moment the docs mention:
If what you want is only to change the property’s value, you should use set and overwrite it with the desired value.
However this only applies to single properties, like a string or a number.
Would it make sense if tljh-config set could also be used to set a list (and potentially a dict too) as a value?
It sounds like it would be useful for example when managing the list of admin users. For now it's possible to control the list of admins with tljh-config add-item users.admin foo, but multiple calls to this command will add multiple entries to the list:
users:
admin:
- foo
- foo
Then calling tljh-config remove-item users.admin foo will only remove one item at a time if there are duplicates.
It would be nice if tljh-config set users.admin ['foo', 'bar'] (or something similar like tljh-config set users.admin foo,bar) could override the list in one go.
What do you think?
Thanks!
Relates to
- #709