diff options
Diffstat (limited to 'src/app/selection.rs')
-rw-r--r-- | src/app/selection.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/app/selection.rs b/src/app/selection.rs index 84c806d..c84003e 100644 --- a/src/app/selection.rs +++ b/src/app/selection.rs @@ -2,7 +2,7 @@ use { super::{ AppContext, - AppStateCmdResult, + CmdResult, }, crate::{ errors::ProgramError, @@ -44,29 +44,29 @@ pub struct Selection<'s> { impl Selection<'_> { - /// build a AppStateCmdResult with a launchable which will be used to + /// build a CmdResult with a launchable which will be used to /// 1/ quit broot /// 2/ open the relevant file the best possible way pub fn to_opener( self, con: &AppContext, - ) -> Result<AppStateCmdResult, ProgramError> { + ) -> Result<CmdResult, ProgramError> { Ok(if self.is_exe { let path = self.path.to_string_lossy().to_string(); if let Some(export_path) = &con.launch_args.cmd_export_path { // broot was launched as br, we can launch the executable from the shell let f = OpenOptions::new().append(true).open(export_path)?; writeln!(&f, "{}", path)?; - AppStateCmdResult::Quit + CmdResult::Quit } else { - AppStateCmdResult::from(Launchable::program( + CmdResult::from(Launchable::program( vec![path], None, // we don't set the working directory con, )?) } } else { - AppStateCmdResult::from(Launchable::opener(self.path.to_path_buf())) + CmdResult::from(Launchable::opener(self.path.to_path_buf())) }) } |