From 07291e828a673fdfbc6633406f5b572b4eb6b227 Mon Sep 17 00:00:00 2001 From: nervuri Date: Sat, 25 Dec 2021 18:34:53 +0000 Subject: [PATCH] Fix display bug in `less raw` --- av98.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/av98.py b/av98.py index b007463..9218671 100755 --- a/av98.py +++ b/av98.py @@ -1453,11 +1453,15 @@ Use 'ls -l' to see URLs.""" def do_less(self, *args): """Run most recently visited item through "less" command. 'less raw' displays the raw version of the item.""" - tmp_file = self.tmp_filename if args[0] == 'raw'\ - else self._get_active_tmpfile() + if args[0] == 'raw': + tmp_file = self.tmp_filename + less_opt = '-R' + else: + tmp_file = self._get_active_tmpfile() + less_opt = '-r' cmd_str = self._get_handler_cmd(self.mime) cmd_str = cmd_str % tmp_file - subprocess.call("%s | less -r" % cmd_str, shell=True) + subprocess.call("%s | less %s" % (cmd_str, less_opt), shell=True) @needs_gi def do_fragment(self, *args):