Add session/site name to Patterns to pass to Putty/Kitty

Advertisement

braykov
Joined:
Posts:
92

Add session/site name to Patterns to pass to Putty/Kitty

Hi,
I am using Kitty with WinSCP like this:
kitty.exe -title !U@!@ -cmd "cd '!/'" !U@!@
However I would like my kitty title to have the name of the session that I am opeing - currently I can only pass session hostname, username, etc.
This way when I have multiple sessions open in WinSCP I can have multiple Kitty sessions and the names will match the tabs in WinSCP.
Currently I am making errors, entering commands in one window thinking it is a totally different session.
The session param could be !S and an example terminal client path could be:
kitty.exe -title !S -cmd "cd '!/'" !U@!@

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,074
Location:
Prague, Czechia

Re: Add session/site name to Patterns to pass to Putty/Kitty

OK, good idea. Will consider it.

Reply with quote

braykov
Joined:
Posts:
92

OK, I tested it.
The pattern list did not show any new patterns, but I assumed you implemented !S.
So I tried it and my title showed like this:
sftp://<username>:<password>@<IP>/
The idea was for !S to just provide the session name. The name that is showed in the tab caption and in the Login window (the left-side tree).
Furthermore, the password presented now, points a security concern.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,074
Location:
Prague, Czechia

The new patterns are
!# - port number
!N - session name

Reply with quote

Advertisement

braykov
Joined:
Posts:
92

Hi,
I would like to report a problem with this feature - using the test version that you sent me.

If the session name has a space in it, then Kitty fails to open with an error:
Unable to open connection to
-
Host does not exist

I suppose when constructing the string for the !N parameter you need to use double quotes.
I hope this helps and gets fixed for the new version :wink:

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,074
Location:
Prague, Czechia

That's consistent with other patterns and even with how a variable resolution works in Windows shell (or even *nix shell).

Reply with quote

Advertisement

RomanLangenbourg
Guest

Please, we need pattern for port number!

martin wrote:

The new patterns are
!# - port number
!N - session name

I'm using Super Putty and usually I have not default port. But I can't pass it to SP - so connection refused and I need every time run it manually. Super time consuming and boring. Please, give pattern for port number.

Thanks a lot!

Reply with quote

Advertisement

You can post new topics in this forum