KiTTY icon indicating copy to clipboard operation
KiTTY copied to clipboard

[Bug] KiTTY 0.76.0.2 OSC __pw: no longer sets default path for remote scp

Open systemmonkey42 opened this issue 3 years ago • 2 comments
trafficstars

In previous versions (include 0.74.4.13), OSC __pw:/dir followed by OSC __rv:file.txt would generate a command similar to

kscp -sftp -r -2 "user@host:/dir/file.txt" "downloaddir"

As of 0.76.0.x, the directory set with __pw is ignored, and the command is always

kscp -sftp -r -2 "user@host:file.txt" "downloaddir"

The path is presumably derived from the new configuration items for pscp, however they un-set after upgrade, and by default, no longer match existing and expected behaviour for all previous versions.

systemmonkey42 avatar Dec 07 '21 11:12 systemmonkey42

Can you try to change your prompt to check if there is a conflict ?

export PS1="> "

It seems that, if the prompt has something that interacts with the window title (ex: \e]0;), there is conflict now.

cyd01 avatar Dec 31 '21 08:12 cyd01

The problem still persists when uploading files via drag&drop, I assume this is related. Uploaded files are placed in the home directory, not the current dir. The problem indeed seems to be the prompt.

username@host:~/tmp$ ls ~/
SSL  tmp
username@host:~/tmp$ ls -l
total 0
### dropped test.txt here ###
username@host:~/tmp$ printf "\033]0;__pw:%s\007" `pwd`
username@host:~/tmp$ ls -l
total 0
username@host:~/tmp$ ls -l ~/
total 0
-rw-rw-r-- 1 username username   0 Jun 30 09:04 test.txt
drwxrwxr-x 2 username username   6 Jun 30 09:04 tmp
username@host:~/tmp$ rm ~/test.txt
username@host:~/tmp$ export PS1="> "
### dropped test.txt here ###
> printf "\033]0;__pw:%s\007" `pwd`
> ls -l
total 0
-rw-rw-r-- 1 username username 0 Jun 30 09:05 test.txt
> pwd
/home/username/tmp

It's the default prompt on Ubuntu 20.04, without any modifications on my side.

schneidr avatar Jun 30 '22 07:06 schneidr