mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Fix a harmless error being printed to stderr if shell integration sends an empty cmdline
Fixes #7813
This commit is contained in:
parent
ccc3bee9af
commit
d9b1c8c04f
1 changed files with 3 additions and 2 deletions
|
|
@ -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 ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue