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

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

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

airwoodix
Copy link
Contributor

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:

  • vf globalpackages [-q]: toggle use of system site packages
  • vf globalpackages toggle [-q]: same as above
  • vf globalpackages enable [-q]: enable system site packages
  • vf globalpackages disable [-q]: disable system site packages

The command returns 0 up success.

Comments most welcome. Thanks!

Copy link
Owner

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I made a few minor suggestions. Do they make sense?

virtualfish/virtual.fish Outdated Show resolved Hide resolved
virtualfish/virtual.fish Outdated Show resolved Hide resolved
virtualfish/virtual.fish Outdated Show resolved Hide resolved
virtualfish/virtual.fish Outdated Show resolved Hide resolved
Old behavior (toggle) is preserved when calling with no specific
action. Printing of the new status can now be disabled with the
-q/--quiet switch.
@airwoodix
Copy link
Contributor Author

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).

Copy link
Owner

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your work on this, Etienne. 🏅

@justinmayer justinmayer merged commit 8c95e4b into justinmayer:master Nov 18, 2020
@airwoodix airwoodix deleted the enh-globalpackages branch November 20, 2020 01:33
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

Successfully merging this pull request may close these issues.

2 participants