summaryrefslogtreecommitdiffstats
path: root/src/modes/edit/cli_menu.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/edit/cli_menu.rs')
-rw-r--r--src/modes/edit/cli_menu.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modes/edit/cli_menu.rs b/src/modes/edit/cli_menu.rs
index 591f484..08f4d5d 100644
--- a/src/modes/edit/cli_menu.rs
+++ b/src/modes/edit/cli_menu.rs
@@ -52,7 +52,7 @@ impl CliCommand {
/// Run its parsable command and capture its output.
/// Some environement variables are first set to ensure the colored output.
/// Long running commands may freeze the display.
- fn execute(&self, status: &Status) -> Result<String> {
+ fn execute(&self, status: &Status) -> Result<(String, String)> {
let args = ShellCommandParser::new(self.parsable_command).compute(status)?;
log_info!("execute. {args:?}");
log_line!("Executed {args:?}");
@@ -67,7 +67,7 @@ impl CliCommand {
e = command_output.status
);
};
- Ok(text_output)
+ Ok((text_output, self.parsable_command.to_owned()))
}
}
@@ -97,7 +97,7 @@ impl CliApplications {
/// Run the selected command and capture its output.
/// Some environement variables are first set to ensure the colored output.
/// Long running commands may freeze the display.
- pub fn execute(&self, status: &Status) -> Result<String> {
+ pub fn execute(&self, status: &Status) -> Result<(String, String)> {
self.content[self.index].execute(status)
}
}