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

clock: add unset functionality #2181

Merged
merged 1 commit into from
Nov 7, 2021
Merged

clock: add unset functionality #2181

merged 1 commit into from
Nov 7, 2021

Conversation

RustyBower
Copy link
Contributor

Description

Adds functionality for user to unset their timezones if desired

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@dgw
Copy link
Member

dgw commented Sep 9, 2021

ctz? tf/ctf?

@RustyBower RustyBower changed the title clock: adding unsettz functionality clock: add unset functionality Sep 10, 2021
@dgw
Copy link
Member

dgw commented Sep 20, 2021

What about .unsetctf?

Also musing that maybe it's less awkward to call these "clear" instead of "unset". My mental jury is still out on whether to put that before or after the type (e.g. .tzclear vs. .cleartz).

@dgw dgw added the Feature label Sep 20, 2021
@dgw dgw added this to the 8.0.0 milestone Sep 20, 2021
@dgw dgw self-requested a review September 20, 2021 09:50
@half-duplex
Copy link
Member

Personally, where a command can be reused without making it too confusing, I prefer that over a new command. .settz - or .settz none?

@RustyBower
Copy link
Contributor Author

RustyBower commented Sep 22, 2021

Personally, where a command can be reused without making it too confusing, I prefer that over a new command. .settz - or .settz none?

I disagree, I really try to avoid overloading a command where possible, and to @dgw's question, .settz and .unsettz are natural opposites, versus something like .tzclear which is antithetical to the format for .settz

We also use .unset X repeatedly throughout the codebase, so I'd prefer to stay consistent there

@dgw dgw closed this Sep 22, 2021
@dgw dgw reopened this Sep 22, 2021
@dgw
Copy link
Member

dgw commented Sep 22, 2021

Welp, I can't laugh at "sorry, misclicked" people any more. Touchpads are something else…

Rusty's points are well taken, and I'm just stuck on the missing .unsetchanneltf command now.

@half-duplex
Copy link
Member

Eh... Personally, I'd still rather one if in the .setX than polluting .help by adding another four commands.
I only see one other '.unset*' command, and it's in admin.py for unsetting a config option, where 'none'/'-'/etc would potentially be valid values for .set.

@RustyBower
Copy link
Contributor Author

Good spot @dgw :)

@RustyBower
Copy link
Contributor Author

Eh... Personally, I'd still rather one if in the .setX than polluting .help by adding another four commands.
I only see one other '.unset*' command, and it's in admin.py for unsetting a config option, where 'none'/'-'/etc would potentially be valid values for .set.

I'll defer to @dgw on this, since he has to maintain this, but personally, I am adamantly against overloading commands (especially a set command with unset functionality) to have complex usage logic, rather than having a few extra commands in help.

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

I'll approve this as-is. @RustyBower please just squash to one commit.

If we're going to have the argument about overloaded vs. separate commands, it should be held separately—and if overloading wins, we'd have to rework the .get* commands in here too. Most likely overloaded command usage would be .setThing value (set), .setThing (get, no argument), and .setThing - (unset, whether it's - or something more verbose). But this is already too much about that line of reasoning.

@RustyBower
Copy link
Contributor Author

I'll approve this as-is. @RustyBower please just squash to one commit.

Done

@dgw
Copy link
Member

dgw commented Oct 23, 2021

Wait a minute, what's this Unix file-mode change?

image

@RustyBower
Copy link
Contributor Author

Wait a minute, what's this Unix file-mode change?

image

Fixed

@dgw dgw merged commit 4a97936 into master Nov 7, 2021
@dgw dgw deleted the unset_tz branch November 7, 2021 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants