1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix incorrect config path in --help and manpage

Fixes #3154.
This commit is contained in:
Christian Duerr 2020-01-06 16:14:59 +00:00 committed by GitHub
parent 7fd17ab0dd
commit 18836f20dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View file

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 0.4.2-dev
### Fixed
- Incorrect default config path in `--help` on Windows and macOS
## 0.4.1
### Packaging

View file

@ -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")

View file

@ -49,7 +49,15 @@ Defines the window class hint on Linux [default: Alacritty,Alacritty ]
Command and args to execute (must be last argument)
.TP
\fB\-\-config\-file\fR <config\-file>
Specify alternative configuration file [default: $XDG_CONFIG_HOME/alacritty/alacritty.yml]
Specify alternative configuration file
Alacritty looks for the configuration file at the following paths:
1. $XDG_CONFIG_HOME/alacritty/alacritty.yml
2. $XDG_CONFIG_HOME/alacritty.yml
3. $HOME/.config/alacritty/alacritty.yml
4. $HOME/.alacritty.yml
On Windows, the configuration file is located at %APPDATA%\\alacritty\\alacritty.yml.
.TP
\fB\-d\fR, \fB\-\-dimensions\fR <columns> <lines>
Defines the window dimensions. Falls back to size specified by window manager if set to 0x0 [default: 0x0]