Add Configuration section to README (#47)

* add configuration section to README

* fix README

* update gobang.gif

* remove name field
This commit is contained in:
Takayuki Maeda 2021-08-28 17:47:49 +09:00 committed by GitHub
parent ae639a3da2
commit 24c9b27a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 1 deletions

View File

@ -41,3 +41,28 @@ $ cargo install --version 0.1.0-alpha.0 gobang
| <kbd></kbd> | Move focus to right | | <kbd></kbd> | Move focus to right |
| <kbd></kbd> | Move focus to left | | <kbd></kbd> | Move focus to left |
| <kbd>/</kbd> | Filter | | <kbd>/</kbd> | Filter |
## Configuration
The location of the file depends on your OS:
- macOS: `$HOME/.config/gitui/config.toml`
- Linux: `$HOME/.config/gitui/config.toml`
- Windows: `%APPDATA%/gitui/config.toml`
The following is a sample config.toml file:
```toml
[[conn]]
type = "mysql"
user = "root"
host = "localhost"
port = 3306
[[conn]]
type = "mysql"
user = "root"
host = "localhost"
port = 3306
database = "foo"
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 MiB

After

Width:  |  Height:  |  Size: 8.3 MiB

View File

@ -132,7 +132,7 @@ impl Config {
let config_path = if let Some(config_path) = &config.config_path { let config_path = if let Some(config_path) = &config.config_path {
config_path.clone() config_path.clone()
} else { } else {
get_app_config_path()?.join("config.yml") get_app_config_path()?.join("config.toml")
}; };
if let Ok(file) = File::open(config_path) { if let Ok(file) = File::open(config_path) {
let mut buf_reader = BufReader::new(file); let mut buf_reader = BufReader::new(file);