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
 

Flexible path handling

Edoardo Tirtarahardja - Wed 16/11/2016 01:36:15 CET +0100

Hi, I have several requests:
1. Path variables.
Is it possible to introduce somekind of variable to be used in KITTY.INI for any settings involving path. Even allowing to use env. var. Let say, if you introduce a %KITTY_PATH% var. that points to the location of KITTY.EXE, then if we can have the following structure:
%PATH_TO_KITTY%\BIN\KITTY.EXE
     KITTY.INI
%PATH_TO_KITTY%\APPS\KITTY\

Then in KITTY.INI, I can put:
...
configdir=%KITTY_PATH%\..\APPS\KITTY
downloaddir=%SystemDrive%\Download
...

I'm thinking of having %KITTY_PATH% and/or %PWD% for the process's working directory is a very good feature. Make sure these var. can be a UNC path, not just a path with drive letter.

2. Please let %CONFIG_DIR%\SESSIONS\Default%20Settings allowed to be set as R/O without complaining.
I just upgrade from v6.3 to 6.7 and facing a constant complains about the file is not writeable. I set it R/O for a reason.

Cyd - Wed 16/11/2016 08:24:29 CET +0100

Add these lines to your kitty.ini file:

[ConfigBox]
defaultsettings=no

Edoardo Tirtarahardja - Mon 21/11/2016 20:17:55 CET +0100

Hi Cyd,

Thx, that tips get rid off the issue 2 nagging complaint, BUT it has side effects. I can't load the defaultsettings. In previous version, this is not an issue if %CONFIG_DIR%\SESSIONS\Default%20Settings is set to R/O, I can still load the default settings. For now it can server as workaround as I don't normally load the defaultsettings anyway.

But it will be nice if we can restore the old behavior for the real solution.

Any take on issue no. 1?

Edoardo Tirtarahardja - Mon 21/11/2016 20:25:05 CET +0100

I stand corrected.
[ConfigBox]
defaultsettings=no

Is a good solution for my request no. 2. My bad, sorry about that.

So only req. no. 1 that I wish can be accommodated soon. Thx.

Cyd - Tue 22/11/2016 08:13:22 CET +0100

For 1)
I think you should use a .bat file that make the kitty.ini file "on the fly" before running kitty. exe.

Edoardo Tirtarahardja - Tue 22/11/2016 20:28:26 CET +0100

Hi Cyd,

I'm sorry, but .bat file is not preferable in my environment. I tried to avoid it unless there is no other option.

We are in a shared env. where the kitty.ini is in a protected share. So is the configdir. Many applications provide a builtin variable and/or allowing access to env. var. While I think it's possible to create a .bat file and create kitty.ini on the fly and dynamically set the configdir accordingly, but it's a tedious task, especially text handling in windows CLI is sub-par compare to linux.

So I really prefer to have Kitty providing such builtin variable and even better also allowing env. var too. It should not be that difficult to accommodate this. Windows provide API to expand the env. var. So let say 'KITTY_PATH' is the location of kitty.exe (I saw kitty already have sub-routine figuring out the path to kitty.exe, via InitialConfigDir), then:
1. Create env. var. KITTY_PATH within the process, set it to InitialConfigDir value.
2. Expand the configdir using appropriate Windows API.




Answer


The forum is actually closed