lix foo should invoke lix-foo #342

Closed
opened 2024-05-23 02:17:30 +00:00 by qyriad · 6 comments
Owner

We know we want a Lix command. We know the Lix command suite will need significant design work. But we know one thing we definitely want: lix foo invokes lix-foo, like git commands do.

This is a very easy thing to do, and we can Just Do it

We know we want a Lix command. We know the Lix command suite will need significant design work. But we know one thing we definitely want: `lix foo` invokes `lix-foo`, like git commands do. This is a very easy thing to do, and we can Just Do it
qyriad added this to the v2.91 milestone 2024-05-23 02:17:30 +00:00
Owner

Some question: How do we want to handle e.g. --store or other nix-global arguments? Do we pass these as specific environment variables, I guess?

Some question: How do we want to handle e.g. `--store` or other nix-global arguments? Do we pass these as specific environment variables, I guess?
Author
Owner

That's a good question. Mostly relevant to external commands, because for our commands we can simply use the same CLI logic in every command. In a Rust world we would ideally just offer a Rust crate to magically handle global args logic

That's a good question. *Mostly* relevant to external commands, because for our commands we can simply use the same CLI logic in every command. In a Rust world we would ideally just offer a Rust crate to magically handle global args logic
Owner

since we're kind of targeting nix as the implementation language for a bunch of these as well we'd put a json object with all configs into a single environment variable with a static name shared by all commands. that way we'll get enumerability of settings (which we wouldn't get as easily with one env var per option), and a format that's much better behaved as well

since we're kind of targeting nix as the implementation language for a bunch of these as well we'd put a json object with all configs into a single environment variable with a static name shared by all commands. that way we'll get enumerability of settings (which we wouldn't get as easily with one env var per option), and a format that's much better behaved as well
Owner

We should probably allow unknown options only if they're namespaced not under [lix] or so. Then we can provide config support for downstream users without regressing our own ability to keep our own stuff correct.

We should probably allow unknown options *only if they're namespaced not under [lix]* or so. Then we can provide config support for downstream users without regressing our own ability to keep our own stuff correct.
jade modified the milestone from v2.91 to post-release 2024-08-13 01:19:36 +00:00
rbt changed title from lix command MVP: do the git thing to lix foo should invoke lix-foo 2024-08-26 22:57:44 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • comment in cl/2119 ("feat: add support for external lix- prefixed commands in the CLI")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2119", "number": 2119, "kind": "comment"}], "cl_meta": {"2119": {"change_title": "feat: add support for external `lix-` prefixed commands in the CLI"}}} --> This issue was mentioned on Gerrit on the following CLs: * comment in [cl/2119](https://gerrit.lix.systems/c/lix/+/2119) ("feat: add support for external `lix-` prefixed commands in the CLI")
Owner

we have this now :D

we have this now :D
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#342
No description provided.