rez icon indicating copy to clipboard operation
rez copied to clipboard

1279 add support for 3rd party prompt implementations in pwsh powershell

Open instinct-vfx opened this issue 2 years ago • 3 comments

This PR adds support for setting of nested prompt decorators and for 3rd party prompts by adding an option to only set the prompt as an environment variable so it can be used in 3rd party prompts.

To support unicode setups (as in unicode prompt decoration) i also had to add unicode support to the powershell_base write operation in spawn_shell.

I also changed the default for the prompt in Powershell as the old default is really weird when using it repeated for nested shells.

Behavior for nested shells with new defaults: image

Example with custom unicode setup in oh-my-posh: image

It can even do Beer emojis ❤️ image

Fixes #1279

instinct-vfx avatar Apr 10 '22 22:04 instinct-vfx

Consider this WIP until i get to fix the 2.7 compatibility issues.

instinct-vfx avatar Apr 10 '22 22:04 instinct-vfx

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Apr 12 '22 09:04 sonarqubecloud[bot]

Updated powershell base to support unicode output in both py2 and py3. It's likely not the most elegant way, but the least invasive one that i found.

instinct-vfx avatar Apr 12 '22 09:04 instinct-vfx