Allow extra data from a _pure_custom_postpath function #563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using aws-vault, it's sometimes very nice to know which profile is active. I've previously used other (slower) prompts, but I really missed having this data in pure.
However, I realise that adding support for a ton of third party stuff is not the goal of this project, so I was wondering if a simple function "plugin" hook could be added? This pull request very simply checks for a function named
_pure_custom_postpath
, and if it exists, it's invoked and the output is appended after thepath
part in the prompt.As there's a note in the readme saying ...
... I assume that the threshold for adding stuff to pure itself is quite high, so if this is something you explicitly don't want to add I fully understand that. I'm also open to different implementations or ideas for how to potentially make pure "pluggable".