Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File storage #13

Closed
lars18th opened this issue May 5, 2024 · 20 comments
Closed

File storage #13

lars18th opened this issue May 5, 2024 · 20 comments

Comments

@lars18th
Copy link

lars18th commented May 5, 2024

Hi @lalbornoz ,

This is a great project. I'm comming from KiTTY, and this PuTTY fork seems very good. Congratulations!

However, I've missing some useful functionalities from KiTTY. But, I don't want to request you to implement all of them. This is a different fork, and time to time it's good to re-think from zero. 😉

Regarding the FILE STORAGE functionality, that IMHO is the most must-have functionality missing in PuTTY, I feel you can improve PuTTie on these points:

  • Describe in the README the location of the configuration directory. After reading the source code I discovered that is %APPDATA%\PuTTie\*. I feel this a very relevant information that the user needs to know. Don't you think so?
  • Provide a command-line parameter to set the location of this directory. One reason to use file storate is to sync config between different machines. And when you're using this, it's common to have this is a directory like C:\PORTABLE\. Therefore the current implementation will improve with these changes: putty.exe --file C:\PORTABLE\PiTTie\: use the listed directory to store the configuration. And putty.exe --file .: use the directory where the binary is... and not the local directory (this is a special case, and if you don't agree, then you could use --file-root). I hope you agree with this.
  • What's the command-line parameter to list all parameters? The values /?, -h and --help doesn't work. Please, help.

Regards.

@lalbornoz lalbornoz reopened this May 5, 2024
@lalbornoz
Copy link
Owner

All great ideas, will implement this soon. Thanks!

@lars18th
Copy link
Author

lars18th commented May 5, 2024

Reading in more detail the README, I recommend to follow this syntax for the file parameter:

  • --file: like now, uses %APPDATA%\PuTTie\.
  • --file=;C:\my-directory: uses this explicit full-path directory.
  • --file=;.\my-directory: uses this explicit relative-path directory from the "current directory".
  • --file=registry: file storage initialized from the Registry.
  • --file=;~: uses the path from where the binary is stored.
  • --file=registry;~.\another-subdir: combination of the previous parameters, in this case regsitry+relative-path+root-binary.

I suggest this syntax to follow the common --parameter=value model that you're using. And separating the multiple combinations while keeping the current format (for --file and --file=registry).

What you think?

@jslegers73
Copy link

Hi,

I have tried the --file=;~ option but I get an error that it is an unknown parameter. I want to use Puttie like I did with Kitty using the local path where putty.exe is located.

This would be great.

@lalbornoz lalbornoz reopened this May 6, 2024
@lalbornoz lalbornoz reopened this May 6, 2024
@lars18th
Copy link
Author

lars18th commented May 7, 2024

Hi @lalbornoz ,

Nice work with the latest updates! However, regarding the command line help, I have a small suggestion: Please add a simple way to distinguish between "generic" (from PuTTY) and "new" (from PuTTie) parameters. Example:

	printf("Options:\n");
	printf("  -?\n");
[...]
	printf("New options:\n");
	printf("  --file\n");
	printf("  --ephemeral\n");
[...]

Do you agree?

@lalbornoz
Copy link
Owner

Agree

@lalbornoz lalbornoz reopened this May 7, 2024
@jslegers73
Copy link

Nice work. Can I test the change already (Windows machine) ?

@lalbornoz
Copy link
Owner

Implemented in 54773f7.

@jslegers73
Copy link

jslegers73 commented May 7, 2024 via email

@lars18th
Copy link
Author

lars18th commented May 7, 2024

Implemented in 54773f7.

Nice work! I'll test it soon. Thank you.

@lars18th
Copy link
Author

lars18th commented May 7, 2024

However when I try putty -h nothing happens.

Me too! When I call it with /? a window error appears. When I use -h nothing happens. Moreover, when using --file=;~ it dosn't work too.

Any idea?

@lalbornoz
Copy link
Owner

lalbornoz commented May 7, 2024

Thank you for your response. However when I try putty -h nothing happens.

As in nothing is printed to the console/stdout?

@lalbornoz lalbornoz reopened this May 7, 2024
@lalbornoz
Copy link
Owner

However when I try putty -h nothing happens.

Me too! When I call it with /? a window error appears. When I use -h nothing happens. Moreover, when using --file=;~ it dosn't work too.

It's presently -h, --help, or -?. What do you mean by doesn't work? Does saving a session when --file=;~ was specified save it to the correct location?

@lars18th
Copy link
Author

lars18th commented May 7, 2024

However when I try putty -h nothing happens.

Me too! When I call it with /? a window error appears. When I use -h nothing happens. Moreover, when using --file=;~ it dosn't work too.

It's presently -h, --help, or -?. What do you mean by doesn't work? Does saving a session when --file=;~ was specified save it to the correct location?

If I execute putty.exe --help nothing happens. The App is not opened and nothing is printed in the console.
Similar with other parameters. Including putty.exe --file=;~.
This is true in Windows 11 with both: CMD and Windows Terminal; and with the last build: PuTTie Release build (Git commit 54773f7e on branch master)

@lalbornoz
Copy link
Owner

Reproduced both on Windows 10 (I do my testing on wine & Linux) - thanks. Both should be fixed in the upcoming releases.

@jslegers73
Copy link

jslegers73 commented May 8, 2024 via email

@lalbornoz
Copy link
Owner

--file=;~, as was discussed in this issue. Closing this now.

@lars18th
Copy link
Author

lars18th commented May 8, 2024

https://github.com/lalbornoz/PuTTie/releases/tag/PuTTie-file-Release-31a335e7 https://github.com/lalbornoz/PuTTie/releases/tag/PuTTie-registry-Release-31a335e7

Hi @lalbornoz ,

I confirm that all related bugs are now fixed. Thank you.

However, it's quite annoying that the help is printed in a new window. I don't expect this! 😆

@lalbornoz
Copy link
Owner

Thanks! Agree, but you can blame Windows for that.

@jslegers73
Copy link

jslegers73 commented May 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants