geph-official / geph5

116 stars 16 forks source link

Add a default config feature #8

Open cyb77 opened 2 weeks ago

cyb77 commented 2 weeks 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 2 weeks ago

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

nullchinchilla commented 2 weeks 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.