summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/app/panel_state.rs9
-rw-r--r--src/shell_install/bash.rs1
-rw-r--r--src/verb/verb.rs1
4 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4753291..46c7c23 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
### next
- hjson: fix bad parsing on tab alignement
+- now check all args of externals are set, doesn't use the raw {arg}
<a name="v1.6.2"></a>
### v1.6.2 - 2021-07-31
diff --git a/src/app/panel_state.rs b/src/app/panel_state.rs
index 63af80a..bae620f 100644
--- a/src/app/panel_state.rs
+++ b/src/app/panel_state.rs
@@ -461,9 +461,16 @@ pub trait PanelState {
app_state: &mut AppState,
cc: &CmdContext,
) -> Result<CmdResult, ProgramError> {
+ let sel_info = self.sel_info(app_state);
+ if let Some(invocation) = &invocation {
+ if let Some(error) = verb.check_args(&sel_info, &invocation, &app_state.other_panel_path) {
+ debug!("verb.check_args prevented execution: {:?}", &error);
+ return Ok(CmdResult::error(error));
+ }
+ }
let exec_builder = ExecutionStringBuilder::with_invocation(
&verb.invocation_parser,
- self.sel_info(app_state),
+ sel_info,
app_state,
if let Some(inv) = invocation {
&inv.args
diff --git a/src/shell_install/bash.rs b/src/shell_install/bash.rs
index a313983..4343b58 100644
--- a/src/shell_install/bash.rs
+++ b/src/shell_install/bash.rs
@@ -17,7 +17,6 @@ use {
},
directories::UserDirs,
lazy_regex::regex,
- minimad::*,
regex::Captures,
std::{env, fs::OpenOptions, io::Write, path::PathBuf},
termimad::mad_print_inline,
diff --git a/src/verb/verb.rs b/src/verb/verb.rs
index 99ec5bc..c800b06 100644
--- a/src/verb/verb.rs
+++ b/src/verb/verb.rs
@@ -245,7 +245,6 @@ impl Verb {
return "You can't focus without selection".to_string();
}
}
- // TODO check that before
}
let builder = || {