mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-11 02:59:40 +02:00
Fix a harmless error being printed to stderr if shell integration sends an empty cmdline
Fixes #7813
This commit is contained in:
@@ -213,8 +213,9 @@ def compile_match_query(exp: str, is_simple: bool = True) -> MatchPatternType:
|
||||
def decode_cmdline(x: str) -> str:
|
||||
ctype, sep, val = x.partition('=')
|
||||
if ctype == 'cmdline':
|
||||
return next(shlex_split(val, True))
|
||||
if ctype == 'cmdline_url':
|
||||
with suppress(StopIteration):
|
||||
return next(shlex_split(val, True))
|
||||
elif ctype == 'cmdline_url':
|
||||
from urllib.parse import unquote
|
||||
return unquote(val)
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user