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

set - u break the timer plugin #12499

Closed
dsauve-adsk opened this issue Jun 12, 2024 · 3 comments
Closed

set - u break the timer plugin #12499

dsauve-adsk opened this issue Jun 12, 2024 · 3 comments
Labels
Bug Something isn't working Resolution: wontfix This will not be worked on

Comments

@dsauve-adsk
Copy link

dsauve-adsk commented Jun 12, 2024

Describe the bug

when using the timer plugin, if I run the set -u command,

Steps to reproduce

1 - Enable plugin timer
2 - Run the command set -u
3 - Run the command sleep 2

After that, each command will display
__timer_display_timer_precmd:5: TIMER_THRESHOLD: parameter not set

Expected behavior

No parameter not set warning
The command execution time to be display

Screenshots and recordings

No response

OS / Linux distribution

Mac 14.5

Zsh version

5.9

Oh My Zsh version

master (249c708)

Terminal emulator

iterm2

If using WSL on Windows, which version of WSL

None

Additional context

No response

@dsauve-adsk dsauve-adsk added the Bug Something isn't working label Jun 12, 2024
@dsauve-adsk
Copy link
Author

Sorry did not realized it was an external plugin... I'll use timer!

@dsauve-adsk dsauve-adsk reopened this Jun 12, 2024
@dsauve-adsk dsauve-adsk changed the title set - u break the command-time plugin set - u break the timer plugin Jun 12, 2024
@dsauve-adsk
Copy link
Author

Reopened, got the same issue with the timer plugin...

@carlosala
Copy link
Member

Hi!
In general, if you set -u oh-my-zsh will start crying around (omz cli, for example, is not adapted for that).
While fixing it is easy in this instance, I'd rather recommend just avoiding using set -u or setopt no_unset. It'll then be more sustainable and will avoid other issues.
I'll close this, feel free to comment why you particularly need set -u.
Thanks for the report!

@carlosala carlosala closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
@carlosala carlosala added the Resolution: wontfix This will not be worked on label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Resolution: wontfix This will not be worked on
Projects
Status: Done
Development

No branches or pull requests

2 participants