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

Delay update / interactive update #12

Open
ratijas opened this issue Feb 4, 2018 · 10 comments
Open

Delay update / interactive update #12

ratijas opened this issue Feb 4, 2018 · 10 comments

Comments

@ratijas
Copy link

ratijas commented Feb 4, 2018

Please, add an option to skip an update, like oh-my-zsh does. Sometimes it starts to update on a new tab in the most inconvenient moment, so a quick "Would you like Zgen to update?" may save some nerves. (:

@ratijas
Copy link
Author

ratijas commented Sep 29, 2020

Literally, two years have passed...

@unixorn
Copy link
Owner

unixorn commented Sep 29, 2020

I somehow missed this when you opened it, apologies. The main issue I have with a prompt is that then your new terminal windows are blocked on user input.

Maybe add the prompt only if ~/.zgen-prompt-autoupdate exists.

@ratijas
Copy link
Author

ratijas commented Sep 29, 2020

Isn't it exactly what happens now? From time to time, my workflow suddenly get all blocked by unexpected update, without leaving me much of a choice. Why does it feel like using Windows anyway?

Maybe I would be happy to update, but now right now. Maybe I'd even open a separate terminal window specifically for the update, but I definitely don't want to read an update log in an IntelliJ terminal widget, or at console tty while rescuing hung up Xorg server.

And the worst part — if you were to kill the untimely update process, you'd get completely bare zsh, since .zshrc wasn't fully executed.

@ratijas
Copy link
Author

ratijas commented Sep 29, 2020

With that being said, I really want automatic updates. Or at least, I want software to remind/tell me when an update is available. But it most certainly must not be such an intrusive process.

Besides, why not doing this somewhere in the background, completely non-interactively?

@unixorn
Copy link
Owner

unixorn commented Sep 29, 2020

The plugin just calls zgen's internal commands and I didn't want to have them spewing output into the terminal session while you're trying to get work done. I didn't want to just toss it in /dev/null because then you don't get to see any error messages.

Maybe have a flag file to have it warn you "you need to do a zgen selfupdate/zgen update" without actually running the update.

@ratijas
Copy link
Author

ratijas commented Sep 29, 2020

There is definitely more than one way around it. But current strategy is clearly too straight-forward.

Also, would be good to have something like this in zgen itself. I mean, this kind of stuff is my dotfiles, it is not governed under jurisdiction of package managers — I can't just apt update && upgrade or pacman -Suy to update my shell plugins, because neither apt nor pacman aware of zgen.

@unixorn
Copy link
Owner

unixorn commented Sep 29, 2020

When I originally brought it up, the zgen maintainer didn't want an autoupdate patch, which is why I wrote the plugin.

@ratijas
Copy link
Author

ratijas commented Sep 29, 2020

Maybe have a flag file to have it warn you "you need to do a zgen selfupdate/zgen update" without actually running the update.

You know, the old times when people used to have mail in their PS1... Except, now we have fully-blown themes managers like powerlevel{9,10}k and their informative widgets.

the zgen maintainer didn't want an autoupdate patch

Looking at their Gtihub activity, it is almost certainly a dead project by now. At this point, I'm sure they don't want to do anything about it, let alone autoupdate patch. Is it time to migrate elsewhere? Eeewww, changes, not again...

@ratijas
Copy link
Author

ratijas commented Sep 30, 2020

That's how I see it fit:

/me opens up zsh.
— Oh, hello there! Wanna update?
— I'm busy. Get lost.
— Understandable, have nice day.
zgen delays update prompt until tomorrow. It also prints on the screen instructions on how to perform manual update without waiting till next doomsday. (that's "actionable" for 'ya!)

On hour later:
/me finishes whatever he was doing.
— Damn, that was so rude. I'd better watch my attitude.
/me runs zgen update; zgen selfupdate manually.

Tomorrow:
zgen sees last update times, and further delays prompt by a whole week without asking.

@unixorn
Copy link
Owner

unixorn commented Sep 30, 2020

I really didn't want to change away from zgen, but you're right, it is looking pretty dead.

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

No branches or pull requests

2 participants