From e009769575fa3babdf9941432397926097877a62 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Sun, 18 Aug 2019 21:21:33 +0200 Subject: [PATCH] Support commands with arguments Pager and editor can now be complexer comands. --- jan-pona-mute.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jan-pona-mute.py b/jan-pona-mute.py index 2a8916f..774137f 100755 --- a/jan-pona-mute.py +++ b/jan-pona-mute.py @@ -398,7 +398,7 @@ or get it from the cache.""" def show(self, item): """Show the current item.""" if self.pager: - subprocess.run(self.pager, input = str(item), text = True) + subprocess.run(self.pager.split(), input = str(item), text = True) else: print(str(item)) @@ -593,7 +593,9 @@ Use the 'edit' command to edit notes.""" return file = self.get_note_path(line) if self.editor: - subprocess.run([self.editor, file]) + command = self.editor.split() + command.append(file) + subprocess.run(command) self.onecmd("notes") else: print("Use the 'editor' command to set an editor.") -- 2.25.1