forked from solderpunk/AV-98
Fix display bug in `less raw`
This commit is contained in:
parent
71ff278c59
commit
07291e828a
10
av98.py
10
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):
|
||||
|
|
Loading…
Reference in New Issue