This issue is for tracking discussion and development of an extension to the pre-prompt that will allow users to make modifications to it by some means.
The purpose is to minimize the need for our users to maintain a fork just so that they can add some information to the pre-prompt.
Prologue: It would be nice to provide an API that allows user defined segments to run asynchronously as well. And it should be simple enough that it’s hard to make mistakes. Ordering of parts/segments would also be nice and if we ever make a new segment it would be nice if the user doesn’t have to manually enable it due to hard coding the current segments, or whatnot.
Perhaps functions like prompt_pure_add_segment myfunc
and _set_order myfunc 3
(moves it to pos 3 and old 3-n are offset by one).
Another thought I’ve had is more hook-like, e.g. right before re-rendering the prompt. A hook function is called where you can manually modify the preprompt array, but it requires a bit more intimate knowledge of how to work with zsh arrays.
Issue originally raised by @sindresorhus in #458 (comment)
There is a $80.00 open bounty on this issue. Add more on Issuehunt.
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too