mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Only do processing if pager is not an absolute path
This commit is contained in:
@@ -542,14 +542,15 @@ class Window:
|
|||||||
text = self.as_text(as_ansi=True, add_history=True, add_wrap_markers=True)
|
text = self.as_text(as_ansi=True, add_history=True, add_wrap_markers=True)
|
||||||
data = self.pipe_data(text, has_wrap_markers=True)
|
data = self.pipe_data(text, has_wrap_markers=True)
|
||||||
cmd = [x.replace('INPUT_LINE_NUMBER', str(data['input_line_number'])) for x in self.opts.scrollback_pager]
|
cmd = [x.replace('INPUT_LINE_NUMBER', str(data['input_line_number'])) for x in self.opts.scrollback_pager]
|
||||||
import shutil
|
if not os.path.isabs(cmd[0]):
|
||||||
exe = shutil.which(cmd[0])
|
import shutil
|
||||||
if not os.path.isabs(cmd[0]) and not exe:
|
exe = shutil.which(cmd[0])
|
||||||
env = read_shell_environment(self.opts)
|
if not exe:
|
||||||
if env and 'PATH' in env:
|
env = read_shell_environment(self.opts)
|
||||||
exe = shutil.which(cmd[0], path=env['PATH'])
|
if env and 'PATH' in env:
|
||||||
if exe:
|
exe = shutil.which(cmd[0], path=env['PATH'])
|
||||||
cmd[0] = exe
|
if exe:
|
||||||
|
cmd[0] = exe
|
||||||
get_boss().display_scrollback(self, data['text'], cmd)
|
get_boss().display_scrollback(self, data['text'], cmd)
|
||||||
|
|
||||||
def paste_bytes(self, text):
|
def paste_bytes(self, text):
|
||||||
|
|||||||
Reference in New Issue
Block a user