Prompt augmentation in Powershell #1053
instinct-vfx
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
we are currently switching over to using Powershell as our main shell plugin. While working on this i realized, that prompt augmentation is not happening in Powershell. After a quick check in the code I saw it is simply not implemented. I did take a look and tried quite some things but there is a bit of a conceptual problem.
I am not sure if this is Powershell specific as I am not really familiar with many of the other shells.
It would be trivial to replace the prompt, but not to augment it. The reason is, that the prompt override in Powershell is not a string, but a function and how that function is implemented and where the actual return value is is not known and not easy to figure out if this should allow for arbitrary prompts to be set before running Rez (e.g. something like Powerline Plugins).
I played with this over the weekend and one option is to just copy the whole function and then add the results. That in turn only works once, because with the first nested shell it becomes an infinite self reference. I currently see the following options and would like to get some opinions.
I might also be missing other options so feel free to chime in. I am generally not really very happy with the way this is currently set up, and configuration being split amongst main config and plugin config. But that is a separate discussion i guess.
Thoughts?
Adding a bunch of people i know use windows to get opinions. Please everyone chime in if you have an opinion.
@nerdvegas @JeanChristopheMorinPerso @davidlatwe @bfloch
Beta Was this translation helpful? Give feedback.
All reactions