summaryrefslogtreecommitdiffstats
path: root/src/commands/shell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/shell.rs')
-rw-r--r--src/commands/shell.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/shell.rs b/src/commands/shell.rs
index b9cbd1c..5a0c31d 100644
--- a/src/commands/shell.rs
+++ b/src/commands/shell.rs
@@ -23,8 +23,9 @@ impl ShellCommand {
for word in self.words.iter().skip(1) {
match word.as_str() {
"%s" => {
- let curr_tab = context.curr_tab_ref();
- if let Some(curr_list) = curr_tab.curr_list_ref() {
+ if let Some(curr_list) =
+ context.tab_context_ref().curr_tab_ref().curr_list_ref()
+ {
let mut i = 0;
for entry in curr_list.selected_entries().map(|e| e.file_name()) {
command.arg(entry);
@@ -59,7 +60,7 @@ impl JoshutoRunnable for ShellCommand {
fn execute(&self, context: &mut JoshutoContext, backend: &mut TuiBackend) -> JoshutoResult<()> {
backend.terminal_drop();
let res = self.shell_command(context);
- ReloadDirList::soft_reload(context.curr_tab_index, context)?;
+ ReloadDirList::soft_reload(context.tab_context_ref().get_index(), context)?;
context
.message_queue
.push_back(format!("Finished: {}", self.words.join(" ")));