diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2020-10-02 19:10:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 13:10:46 -0400 |
commit | b63324860647b4642c6e05008f8b6a5bf0a7865f (patch) | |
tree | 8f0ecb26f8a56ecce9cb67befb456f041392bf22 /src | |
parent | f7f59cd996611b0de11c7aa47e9910d817d41998 (diff) |
fix(readonly): change module to match docs (#1728)
Diffstat (limited to 'src')
-rw-r--r-- | src/configs/directory.rs | 8 | ||||
-rw-r--r-- | src/modules/directory.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/configs/directory.rs b/src/configs/directory.rs index fe4140011..9adb0bc3f 100644 --- a/src/configs/directory.rs +++ b/src/configs/directory.rs @@ -13,8 +13,8 @@ pub struct DirectoryConfig<'a> { pub format: &'a str, pub style: &'a str, pub disabled: bool, - pub read_only_symbol: &'a str, - pub read_only_symbol_style: &'a str, + pub read_only: &'a str, + pub read_only_style: &'a str, } impl<'a> RootModuleConfig<'a> for DirectoryConfig<'a> { @@ -28,8 +28,8 @@ impl<'a> RootModuleConfig<'a> for DirectoryConfig<'a> { format: "[$path]($style)[$read_only]($read_only_style) ", style: "cyan bold", disabled: false, - read_only_symbol: "🔒", - read_only_symbol_style: "red", + read_only: "🔒", + read_only_style: "red", } } } diff --git a/src/modules/directory.rs b/src/modules/directory.rs index 390480242..783a61f2f 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -97,13 +97,13 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { String::from("") }; let final_dir_string = format!("{}{}", fish_prefix, truncated_dir_string); - let lock_symbol = String::from(config.read_only_symbol); + let lock_symbol = String::from(config.read_only); let parsed = StringFormatter::new(config.format).and_then(|formatter| { formatter .map_style(|variable| match variable { "style" => Some(Ok(config.style)), - "read_only_style" => Some(Ok(config.read_only_symbol_style)), + "read_only_style" => Some(Ok(config.read_only_style)), _ => None, }) .map(|variable| match variable { |