diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-01-06 16:14:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-06 16:14:59 +0000 |
commit | 18836f20ddad440a059989076e782b9633d95f39 (patch) | |
tree | b555f88e398d30826144f01d9b609bf0c29d5341 /alacritty/src/cli.rs | |
parent | 7fd17ab0dd30d9b14318578e4ca7d8da9c6c91d0 (diff) | |
download | r-alacritty-18836f20ddad440a059989076e782b9633d95f39.tar.gz r-alacritty-18836f20ddad440a059989076e782b9633d95f39.tar.bz2 r-alacritty-18836f20ddad440a059989076e782b9633d95f39.zip |
Fix incorrect config path in --help and manpage
Fixes #3154.
Diffstat (limited to 'alacritty/src/cli.rs')
-rw-r--r-- | alacritty/src/cli.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/alacritty/src/cli.rs b/alacritty/src/cli.rs index 6f7f8a68..8abee061 100644 --- a/alacritty/src/cli.rs +++ b/alacritty/src/cli.rs @@ -23,6 +23,13 @@ use alacritty_terminal::index::{Column, Line}; use crate::config::Config; +#[cfg(not(any(target_os = "macos", windows)))] +const CONFIG_PATH: &str = "$XDG_CONFIG_HOME/alacritty/alacritty.yml"; +#[cfg(windows)] +const CONFIG_PATH: &str = "%APPDATA%\\alacritty\\alacritty.yml"; +#[cfg(target_os = "macos")] +const CONFIG_PATH: &str = "$HOME/.config/alacritty/alacritty.yml"; + /// Options specified on the command line pub struct Options { pub live_config_reload: Option<bool>, @@ -158,8 +165,7 @@ impl Options { .help("Start the shell in the specified working directory"), ) .arg(Arg::with_name("config-file").long("config-file").takes_value(true).help( - "Specify alternative configuration file [default: \ - $XDG_CONFIG_HOME/alacritty/alacritty.yml]", + &format!("Specify alternative configuration file [default: {}]", CONFIG_PATH) )) .arg( Arg::with_name("command") |