To give you the best experience, this site uses cookies. Continuing to use 9bis.net means you agree to our use of cookies.
 

English version Russian version Version française Nederlandse versie Versión española Version portuguese Version polonaise Italian version Versiunea româna   KiTTY News

KiTTY : Forum

Last modification : -

KiTTY web site




Forum Home
 

command line options -cmd and -load appear to be mutually exclusive?

kyle0r - Tue 25/09/2012 22:28:55 CEST +0200

Hi there, first up, KiTTY is awesome, thanks for making and maintaining it.

the -cmd is a great feature in KiTTY, I have a question tho, if I use the following command line, things work as expected:

-cygterm -cmd "echo 123" -

If I use the following, the -load works but -cmd appears to then be ignored?

-load "session1" -cmd 123

What is the expected behaviour here?

Thanks

Cyd - Wed 26/09/2012 08:30:04 CEST +0200

Normal
With -load you use the settings of a saved session.
In each saved session there already is an autocommand.

steffen - Thu 01/11/2012 10:46:09 CET +0100

Had the same issue today: I need to load a specific session and send an initialization command (that's generated by another application). I don't think it's normal, since currently there's no use for specifying -cmd option in combination with -load. How's the interpretation? "um... user tries to send a command in combination with --load.. mmh, he must have forgotten, that the saved session already contains a command!".

Jon Drews - Sat 03/11/2012 17:17:30 CET +0100

Just wanted to second this issue. Here's how I see this working:

-cmd should take precedence over the autocommand located in the -load session. -cmd should run even if the -load session has a blank autocommand.

Scenario:
kitty.exe -ssh -P 22 -load "Default Settings" -pass mypass -cmd ifconfig -l myuser 10.0.0.1

ifconfig should be run, regardless of what autocommand is specified in "Default Settings".
Note that currently, ifconfig will not run even if "Default Settings" has a blank autocommand.

Thanks so much for making a great product!

Jon Drews - Sat 03/11/2012 17:25:13 CET +0100

Here is my reason for running -load with -cmd. I want to set up a bunch of defaults in a session (i.e. X11 forwarding, window scrollback lines, terminal colors, etc) but the autocommand I want to run will change depending on what I need.

To be more specific, I use kitty with SuperPutty. I've configured defaults within a kitty session that I want to use. I have separate connections (aka shortcuts) that, when run, tail different log files via a -cmd.

Does this explain why I'm asking to use -load and -cmd? Feel free to write back if something is not clear. Thanks!

steffen - Mon 05/11/2012 09:55:41 CET +0100

Here's mine:
I'm developing software on a remote network share. I use an Eclipse plugin that lets me open a shell (kitty) opening in paths of remote source code files. The command for opening a shell connection would look like ?kitty -load myserver -cmd "cd $path"? or in windows something like
?kitty -load myserver -cmd "cd $(echo $path | sed 's-\(.:\\|\\)-/-g')"?

Thanks to the developers of kitty who make scenarios like this possible!

Jon Drews - Sat 10/11/2012 03:20:11 CET +0100

Update: I'm able to confirm that "Default Settings" gets loaded by default when you don't specify -load, on kitty_portable.exe. For now this will suffice for my purposes. I can set the needed default settings, and then run a -pass and -cmd for my password and auto command per connection I set up.

Xirad - Sat 22/12/2012 11:39:09 CET +0100

First - thanks for greate tool :)

I am next user, which would like to use -cmd parameter, which will overwrite "autocommand". It will be very helpfull :)

Best regards,
Xirad




Answer


The forum is actually closed