summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 3b24a08..ec897b4 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -178,6 +178,13 @@ impl Config {
})
}
+ pub fn merge_prompt(&self, content: &str) -> String {
+ match self.get_prompt() {
+ Some(prompt) => format!("{}\n{content}", prompt.trim()),
+ None => content.to_string(),
+ }
+ }
+
pub fn info(&self) -> Result<String> {
let file_info = |path: &Path| {
let state = if path.exists() { "" } else { " ⚠️" };