-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: export ENV vars command line clap2env tool #52
Comments
will donate 100 USD in crypto for such tool :) |
I believe there is a tool that wraps clap for use in bash. Not finding it atm but on mobile. One challenge with the suggested approach is that the tool can't modify the outside environment. It could dump a script to be |
Yeah, I searched various terms, not found yet. I am ok with Go/C/Zig/AOT compiled bytecode - as long as startup is fast. I just found that clap seems fits as per clap-serde crate already does half of work. |
yeah, i see. so it can be something like: # bash is bad here, but kind of this to work
source < $(clap2nix clap-config.toml $@) and other option try work: # so not clear how process reuse shell called it - seems not great until there is 100% portable robust cargo to handle that
clap2nix clap-config.toml $@ -- echo $SOME_PAR |
flow considered
https://discourse.nixos.org/t/nix-bash-maxi-declaratively-configured-cli-args-to-env-vars-tool/37735
Run
example.sh --some-par=42
:will give
The text was updated successfully, but these errors were encountered: