geph-official / geph5

162 stars 30 forks source link

Add a default config feature #8

Closed cyb77 closed 4 months ago

cyb77 commented 5 months ago

geph4-client used the "connect" subcommand to start a connection. Maybe geph5-client can benefit from a default "subcommand" or flag, in the same way that for example, ImageMagick now uses the "magick" command itself, instead of "magick convert" for image conversion, since connection is the main use case of the geph-client binary.

What I did here is one way of doing it and it's open to change if anyone thinks there's a better or cleaner way of doing it.

cyb77 commented 5 months ago

@nullchinchilla I also updated the lock file initially out of habit, but that can be reversed if it's undesired

nullchinchilla commented 5 months ago

I don't think a default subcommand makes too much sense, but a default config can be nice. That can be done more easily using the clap default stuff, and I also think that save_config doesn't make much sense.

cyb77 commented 4 months ago

Hmm, makes sense. OK I'll close the PR for now, I'll revisit this idea in another PR (maybe this time integrating the geph5-client-gui config into it, and without the unnecessary CLI options).