summaryrefslogtreecommitdiffstats
path: root/src/commands/sub_process.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/sub_process.rs')
-rw-r--r--src/commands/sub_process.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/commands/sub_process.rs b/src/commands/sub_process.rs
index 9f97af1..437112e 100644
--- a/src/commands/sub_process.rs
+++ b/src/commands/sub_process.rs
@@ -39,6 +39,23 @@ fn execute_sub_process(
command.arg(x);
});
}
+ "%p" => {
+ if let Some(curr_list) = context.tab_context_ref().curr_tab_ref().curr_list_ref() {
+ let mut i = 0;
+ curr_list
+ .iter_selected()
+ .map(|e| e.file_path())
+ .for_each(|file_path| {
+ command.arg(file_path);
+ i += 1;
+ });
+ if i == 0 {
+ if let Some(entry) = curr_list.curr_entry_ref() {
+ command.arg(entry.file_path());
+ }
+ }
+ }
+ }
s => {
command.arg(s);
}