-
Notifications
You must be signed in to change notification settings - Fork 111
Description
To Reproduce
Open a Learn module on MS Learn, like unit 5 here https://docs.microsoft.com/en-us/learn/modules/implement-message-workflows-with-service-bus/5-exercise-write-code-that-uses-service-bus-queues and then launch the cloud shell in the browser, in the same tab.
Observed Behavior
The problem is that the prompt is too long and takes the whole screen width, since it's displaying the whole PWD instead of just the current folder.
Expected behavior
Have a shorter CLI prompt.
We could modify the PS1 variable in .bashrc when we see the modifier \w that displays the full path, we could have \W instead (uppercase W. see screenshot for the difference).
Context
Cloud Shell on Learn seems to use a .bashrc file similar to this one https://github.com/ams0/azure-cloudshell/blob/master/bashrc#L121 since there's that Azure modifier to PS1, but I couldn't find where that sits on this repo.
A quick solution could be during container boot, to have the docker file cat a PS1=${PS1//\\w/\\W} into $HOME/.bashrc
Tagging @johnpapa to the discussion, since he's on board for the change for Learn.
