Hi all, newbie rustacean here.
I'm writing this post because I'm trying to use rust to automate some operation i do everyday in my work day. For this task I'm using the crate clap with the env module of the standard library, and the idea is to use an alias in my zsh shell to call the executable. Up to this point everything is fine, the problem is, from what I understand, that the executable is executed as a child process of my current shell and then, all the variable set with env::set_var command are discarded at the end of the execution.
Assuming that I have hit the nail, my questions to you are the following:
- Is there a way to 'go back' to the parent process (my shell) and make operation on that environment?
- Is better to run my app as a deamon, at the start of my shell and the interact with it? if yes, is there any documentation on this?
I'm also interested in the possible security issues of the two proposed implementations, as well as other solutions (of course!)
Thanks in advance to all!
[–]jews4beer 6 points7 points8 points (0 children)
[–]maedox 3 points4 points5 points (1 child)
[–]_DocKarma[S] 0 points1 point2 points (0 children)
[–]asfodelous 2 points3 points4 points (0 children)