From 5f0121a4042c739268350efe44527a3a6e1b2461 Mon Sep 17 00:00:00 2001 From: quak Date: Tue, 28 Jan 2025 00:01:17 +0100 Subject: [PATCH] merged `stack_home_as_tilde` & `book_home_as_tilde` to `show_home_as_tilde` --- src/bookmarks.rs | 2 +- src/config.rs | 4 +--- src/stack.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bookmarks.rs b/src/bookmarks.rs index 80f3ad3..7e83ba3 100644 --- a/src/bookmarks.rs +++ b/src/bookmarks.rs @@ -116,7 +116,7 @@ impl Bookmarks { ); let mut path = apply_format(path.to_str().unwrap(), &config.styles.bookmarks_path_style); - if config.format.book_home_as_tilde { + if config.format.show_home_as_tilde { let home = match home_dir() { Some(value) => match value.into_os_string().into_string() { Ok(value) => value, diff --git a/src/config.rs b/src/config.rs index 1780b01..c125398 100644 --- a/src/config.rs +++ b/src/config.rs @@ -35,11 +35,9 @@ pub struct FormatSettings { #[default_value(" - ")] pub stack_separator: String, #[default_value(false)] - pub stack_home_as_tilde: bool, + pub show_home_as_tilde: bool, #[default_value(" - ")] pub bookmarks_separator: String, - #[default_value(false)] - pub book_home_as_tilde: bool, } #[derive(Debug, Clone, Default, ConfigParser)] diff --git a/src/stack.rs b/src/stack.rs index 4fff69a..bc2ec8a 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -50,7 +50,7 @@ impl Stack { &config.styles.stack_separator_style, ); let mut path = apply_format(item.to_str().unwrap(), &config.styles.stack_path_style); - if config.format.stack_home_as_tilde { + if config.format.show_home_as_tilde { let home = match home_dir() { Some(value) => match value.into_os_string().into_string() { Ok(value) => value,