Change the prompt in powershell
taijidude

taijidude @taijidude

About: Java Developer. Love to read and learn. Hobbies: - tabletop rpgs - boardgames - videogames - cooking - kettlebell

Location:
Hannover, Germany
Joined:
Jul 22, 2020

Change the prompt in powershell

Publish Date: Feb 7 '21
0 0

Hello everyone,

short post this week. Was working on another post but not really satisfied with it. So you get this short intermission.

What i learned not to long ago ist, that you are able to change you prompt in powershell. You have to put a function named prompt into your Powershell Profile.


function prompt {"PS: $(get-date) / $PWD \n >"}

Enter fullscreen mode Exit fullscreen mode

And after the next start you will get the changed prompt:

Alt Text

By the way a line break in powershell is written like this:

"`n"
Enter fullscreen mode Exit fullscreen mode

The double quotes are important, if you use single quotes it will not work.

Comments 0 total

    Add comment