classicsc / syncthingmanager

Configure Syncthing from the CLI
GNU General Public License v3.0
84 stars 9 forks source link

A few comments on the CLI syntax #17

Open doronbehar opened 5 years ago

doronbehar commented 5 years ago

Hello @classicsc,

I'm building ZSH completion for stman and since I've covered all of the sub-commands and their sub-commands etc. , I have a few enhancements suggestions:

device vs server terminology

Currently, there is a global flag called --device which chooses the device configured in syncthingmanager's configuration file. It seems it would have been better to call rename it to --server so it won't be confused with device related commands?

Editing folders

I've noticed that there is both the stman folder edit command and stman folder versioning command. Both of these commands seem to use SyncthingManager.folder_edit so perhaps it would have been better to put everything under another subparser? I think this would could be more consistent with the structure of the whole XML file that is actually used in the API calls.

Undocumented / missing extra parameters for stman folder versioning:

In addition to the previous topic, some versioning options have additional arguments. According to my tests only the external versioning scheme works when an additional argument (the external command) is provided. Providing any additional argument for the simple or the staggered versioning schemes is not supported and certain default values are used instead.

I'd be happy to know your opinion because I'd like to contribute fixes to these issues. I have a few other suggestions not covered here that might contribute as well but most importantly, aid when it'll be time for the ZSH completion to be submitted, depending on your approval.

sten0 commented 5 years ago

+1, this would be really nice to have before tagging a stable release. On that topic, a friend and colleague of mine was unhappy about having to ssh forward the admin port to interact with syncthing on a headless server, so I'd like to package syncthingmanager for Debian once a release is tagged. P.S. I'm willing to adapt the ZSH completion for BASH if @doronbehar doesn't include one in his PR.