-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Change config subcommand into --config flag #290
Comments
Thank you for the post! |
From a usability perspective having this be a subcommand is also just weird. I'm struggling to think of what else you might want to add to |
This changes the `config` subcommand to a config flag. Add option subcommand for now, for the clearing of default path. Add `ZELLIJ_CONFIG` environment variable. The configuration locations are now as follows: * `--config` flag * `ZELLIJ_CONFIG` environment variable * default config location in that order.
Yes, that makes a lot of sense. |
Outputting the default configuration file could be a subcommand. But doing so would likely want to print it to stdout and thus wouldn't care about a path, and so isn't suitable for |
Thank you for the feedback! |
I want to wrap
zellij
with a shell function that provides a default (non-standard) config path. Since Zellij currently uses a subcommand to change the config location, this means I can't wrap it without either breaking other commands or reimplementing my own parser for Zellij's complete set of args/flags. By making it a--config
flag, that also implies that the presence of this flag does not change the action Zellij takes, it only defines where the config is found when it spawns a session. Which is to say,zellij --config path/to/config help
should show the same output aszellij help
. The equivalent tozellij config --clean
could bezellij --config ''
.Additionally, if the user passes multiple
--config
flags, it would be nice if Zellij could simply ignore the earlier ones and use the last one passed. That way someone can still invoke my wrapper with a--config
flag and it will take precedence.My use-case here is wrapping Zellij with Nix, and putting the Zellij config into Nix as well.
An alternative to making this change is defining an env var that I can set that overrides the default config path. That way my wrapper can simply set that env var.
The text was updated successfully, but these errors were encountered: