Using the OS environment settings
There are several ways to look at inputs provided by the users of our software:
- Interactive input: This is provided by the user on demand, as they interact with the application or service.
- Command-line arguments: These are provided once, when the program is started.
- Environment variables: These are OS-level settings. There are several ways these can be set, as shown in the following list:
- Environment variables can be set at the command line, when the application starts.
- They can be configured for a user in a configuration file for the user's selected shell. For example, if using zsh, these files are the
~/.zshrc
file and the~/.profile
file. There can also be system-wide files, like/etc/zshrc
. This makes the values persistent and less interactive than the command line. Other shells offer other filenames for settings and configurations unique to the shell. - In Windows, there's the Advanced Settings...