Open catleeball opened 4 years ago
I might break out the event-based update bug, and the example implementations into bugs, noting the caveat that this would need to first be implemented.
EDIT: I'll wait to figure out if this is a feasible feature before spamming more FRs with the above examples.
I think this could be a really interesting feature to add however this is definitely not possible at the moment and I don't think it is going to be simple to implement. The main difficulties are going to be around getting this to work across the different shells that starship supports. Related issue https://github.com/starship/starship/issues/1124#issuecomment-616682179 might also be a good place to start discussing this.
@andytom : Understood, thanks for the info! Reading the comment you link does make it sound like a major overhaul to get support everywhere.
Feature Request
It would be very nice if Starship could refresh the current prompt on a timer. This would allow interesting additional features for modules, and provide avenues for new modules that would be infeasible without a periodic updating prompt.
See alternative 1 below regarding a live prompt using event-driven prompt updates.
This would enable things like:
Describe the solution you'd like
Modules that use this feature could expose an
update-interval = int seconds
flag in the config, where users can specify how fast the prompt will update. Possibly, also a flag to disable updates, likeperiodic-update = bool
For performance and low spec machines, it might be best to recommend developers default modules to having periodic updates toggled off, where applicable. Some use cases where this wouldn't be applicable are some possible fun1 new modules:
Describe alternatives you've considered
starship init
every N seconds likely incurs a lot of operations we don't actually need to re-run when we just want to refresh the display and update relevant modules)1: Fun is subjective. Your milage may vary.