mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
54155: specify $HOST in OSC7 working directory report
This commit is contained in:
committed by
Oliver Kiddle
parent
6c67981033
commit
b0ad7ab750
@@ -1,5 +1,8 @@
|
||||
2026-04-05 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* Johannes Altmanninger: 54155: Src/Zle/termquery.c:
|
||||
specify $HOST in OSC7 working directory report
|
||||
|
||||
* Johannes Altmanninger: 54154: Src/Zle/termquery.c:
|
||||
extract function for URL-encoding and writing to TTY
|
||||
|
||||
|
||||
@@ -777,11 +777,16 @@ write_urlencoded(const char *path_components)
|
||||
void
|
||||
notify_pwd(void)
|
||||
{
|
||||
const char *hostnam;
|
||||
|
||||
if (!extension_enabled("integration", "pwd", 11, 1))
|
||||
return;
|
||||
|
||||
/* only "localhost" seems to be much use here as the host */
|
||||
write_loop(SHTTY, "\033]7;file://localhost", 20);
|
||||
if ((hostnam = getsparam("HOST")) == NULL || strchr(hostnam, '/') != NULL)
|
||||
return;
|
||||
|
||||
write_loop(SHTTY, "\033]7;file://", 11);
|
||||
write_urlencoded(hostnam);
|
||||
write_urlencoded(pwd);
|
||||
write_loop(SHTTY, "\033\\", 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user