justinmayer / virtualfish

Fish shell tool for managing Python virtual environments
MIT License
1.06k stars 100 forks source link

globalpackages: add enable/disable/toggle subcommands, add help #193

Closed airwoodix closed 3 years ago

airwoodix commented 4 years ago

Hello!

This patch implements explicit actions for vf globalpackages as discussed in #181. The old behavior (toggle) is preserved when calling with no explicit action. I also added a -q/--quiet switch to remove the new state display. Finally, reworking this was the opportunity to add a help message, following the incentive in #105.

New usage:

The command returns 0 up success.

Comments most welcome. Thanks!

airwoodix commented 3 years ago

Thanks for the feedback! Using long options sounds good to me. I'd go for the short version if there's something widely used/idiomatic but that's definitely not the case here. Sorry for the faulty copy-paste (I guess leaving the duplicated comment is good to avoid messing up with the next line at all spots).