Open aqw opened 1 month ago
While writing this, it became apparent that we overlooked onyo.template
in the design phase. It is very clearly the odd one out. It has no value beyond onyo new
, and could never be queryable.
What about something like onyo.new.template
(or onyo.new.--template
or...). Or maybe onyo.cli.--template
(and make `onyo.cli. a generic namespace to call flags)?
Ideas are most welcome here.
I have created #692 to allow onyo new
to temporarily override onyo configuration key values. That solves the onyo.template
problem.
I like this approach. Want to throw in one more thing, though: onyo.is.template
.
This isn't actually related to the template "key" you mentioned above, but to #675.
Yup! This issue I intentionally omits keys for new features. There is an onyo.is.template
in #675
Generally, I do support the idea of onyo.cli.template
. I wouldn't put in the --
, though. While it's a reference to a command option, the weirdness of onyo.cli.--template
isn't necessary and furthermore: There is a difference in behavior. Such keys would be meant to specify per-asset options. Which is different from the switch itself, which refers to the entire command.
All Pseudo Keys, now and in the future, should live under the
onyo.
namespace. See #678 for design background.New Structure:
onyo.is.asset
:True
orFalse
onyo.is.directory
:True
orFalse
onyo.path.relative
: path relative to repo root (currently whatpath
is)onyo.path.parent
: parent directory (currently whatdirectory
is)onyo.path.file
: full path relative to repo root (relevant for asset directories and templates)Retired:
directory
(nowonyo.path.parent
)path
(nowonyo.path.relative
)template
692 is not a blocker for this issue, and
template
can be skipped or removed entirely, whatever is easieris_asset_directory
Note:
True
/False
, etc). If they are truly irrelevant/impossible, then<unset>
is the appropriate value.True
for bothis.asset
andis.directory
).set
able (perhapsonyo.path.parent
(i.e.mv
) andonyo.is.directory
(i.e.mkdir
/rmdir
))Future (out of scope for this issue; just context):
662 will live under
onyo.git
675 will add
onyo.is.template
:True
orFalse
674 will add
onyo.is.empty
:True
orFalse
(only everTrue
for directories and possibly templates)692 will add
onyo.config.*