-
Notifications
You must be signed in to change notification settings - Fork 5
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
Design: allow onyo set
to set different values for the same key across multiple assets
#710
Comments
Fully agree. I literally assumed this would already be the case, because it should be. I like |
I think it's a little less useful than in Question is: Is there a way that makes it easier to generate the call programmatically? Would an |
Yes and no. Brace expansion's is ordered, which I imagine will be the most common case here. Globbing.... I don't know if that's defined in POSIX or not, but I do know that bash's globbing is alphabetical. But Other times, order doesn't matter. As a concrete example, Ralf set the inventory number as the serial for 10 identical external drives. Ignoring the idea of being able to reference other keys (which I've been thinking about recently), I wanted to do:
What would take this all further is the ability to reference other keys within the same asset. Something f-string like:
That would improve the ergonomics for use-cases that don't care about the order of what is passed into the query, just that it's grouped together when executed within an asset. This would be most powerful with #684 It's a separate issue from this one, but wanted to point it out. It would also allow for renaming a key, etc:
|
On that note, referencing #714 here. |
Closing in favor of #717 |
Currently,
onyo set
only allows a key to be defined once:I like the idea of matching what we do in
onyo new
, where we do allow multiple keys to be specified, as long as they are either just once, or the exact sameN
number of times.The twist here would be that
N
must also match the number of assets passed to--asset
.The text was updated successfully, but these errors were encountered: