nu_utils/consts.rs
1/// Name of the PATH environment variable on Windows systems.
2#[cfg(windows)]
3pub const NATIVE_PATH_ENV_VAR: &str = "Path";
4/// Name of the PATH environment variable on Unix-like systems (Linux, macOS, etc.).
5#[cfg(not(windows))]
6pub const NATIVE_PATH_ENV_VAR: &str = "PATH";
7
8/// Character used to separate directories in a PATH environment variable on Windows is ";".
9#[cfg(target_family = "windows")]
10pub const ENV_PATH_SEPARATOR_CHAR: char = ';';
11/// Character used to separate directories in a PATH environment variable on Linux/macOS/Unix is ":".
12#[cfg(not(target_family = "windows"))]
13pub const ENV_PATH_SEPARATOR_CHAR: char = ':';
14
15/// Line separator used on Windows is "\r\n".
16#[cfg(target_family = "windows")]
17pub const LINE_SEPARATOR_STR: &str = "\r\n";
18/// Line separator used on Linux/macOS/Unix is "\n".
19#[cfg(not(target_family = "windows"))]
20pub const LINE_SEPARATOR_STR: &str = "\n";