When dropping URLs/files onto kitty at a shell prompt insert them appropriately quoted and space separated
This commit is contained in:
parent
6689d312a3
commit
a8826f0d02
@ -97,6 +97,9 @@ Detailed list of changes
|
|||||||
- Fix :ac:`show_last_command_output` not working when the output is stored
|
- Fix :ac:`show_last_command_output` not working when the output is stored
|
||||||
partially in the scrollback pager history buffer (:iss:`4435`)
|
partially in the scrollback pager history buffer (:iss:`4435`)
|
||||||
|
|
||||||
|
- When dropping URLs/files onto kitty at a shell prompt insert them appropriately quoted and space
|
||||||
|
separated (:iss:`4734`)
|
||||||
|
|
||||||
- Improve CWD detection when there are multiple foreground processes in the TTY process group
|
- Improve CWD detection when there are multiple foreground processes in the TTY process group
|
||||||
|
|
||||||
- A new option :opt:`narrow_symbols` to turn off opportunistic wide rendering of private use codepoints
|
- A new option :opt:`narrow_symbols` to turn off opportunistic wide rendering of private use codepoints
|
||||||
|
|||||||
@ -1221,7 +1221,12 @@ class Boss:
|
|||||||
if w is not None:
|
if w is not None:
|
||||||
text = data.decode('utf-8', 'replace')
|
text = data.decode('utf-8', 'replace')
|
||||||
if mime == 'text/uri-list':
|
if mime == 'text/uri-list':
|
||||||
text = '\n'.join(parse_uri_list(text))
|
urls = parse_uri_list(text)
|
||||||
|
if w.at_prompt:
|
||||||
|
import shlex
|
||||||
|
text = ' '.join(map(shlex.quote, urls))
|
||||||
|
else:
|
||||||
|
text = '\n'.join(urls)
|
||||||
w.paste(text)
|
w.paste(text)
|
||||||
|
|
||||||
@ac('win', 'Focus the nth OS window')
|
@ac('win', 'Focus the nth OS window')
|
||||||
|
|||||||
@ -520,9 +520,13 @@ class Window:
|
|||||||
def current_colors(self) -> Dict[str, Optional[int]]:
|
def current_colors(self) -> Dict[str, Optional[int]]:
|
||||||
return self.screen.color_profile.as_dict()
|
return self.screen.color_profile.as_dict()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def at_prompt(self) -> bool:
|
||||||
|
return self.screen.cursor_at_prompt()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_running_program(self) -> bool:
|
def has_running_program(self) -> bool:
|
||||||
return not self.screen.cursor_at_prompt()
|
return not self.at_prompt
|
||||||
|
|
||||||
def matches(self, field: str, pat: MatchPatternType) -> bool:
|
def matches(self, field: str, pat: MatchPatternType) -> bool:
|
||||||
if not pat:
|
if not pat:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user