3 ms·
At some point i learned about the way to export environment variables to a single command: LD_LIBRARY_PATH=build/lib build/bin/mycommand I try to use that w
by twic 9y ago
At some point i learned about the way to export environment variables to a single command:
LD_LIBRARY_PATH=build/lib build/bin/mycommand
I try to use that whenever i can, and as such it is now very rare for me to generally export a variable in my shell.
- koolba 9y agoAdd an extra space in the front to prevent your shell from adding the (potentially secret) env vars to your plaintext history file.
- twic 9y agoIn that situation, i'm more likely to write: MY_SECRET=$(read) some_command Without the space. That way, i get the utility of command history, without the danger of the secret being in there.