![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| | |||||||
| | Vista - customizing the command prompt |
| |
| 09-06-2007 | #1 |
| | customizing the command prompt I am looking for a way to customize the command prompt in PS. In cmd.exe I can use $_$p$_ to create a prompt where the path and the text that I type in are on separate lines. This keeps the commands from wrapping when there is a long path in the prompt. It makes it easy to select command text with a mouse and to read without dealing with line wrap which I find rather irritating. How would I do this in PS? And yes, I'm an old UNIX hack that now has to deal with bronze age command line terminals like PS and cmd and am used to BASH or tcsh. -- Jack of All Trades, Master of None |
| My System Specs |
| 09-06-2007 | #2 |
| | RE: customizing the command prompt Well the short version is that you create a function in your profile named Prompt. Whatever this function outputs or writes to the host will become your .... well ... prompt. "flyfisher1952" wrote: Quote: > I am looking for a way to customize the command prompt in PS. In cmd.exe I > can use $_$p$_ to create a prompt where the path and the text that I type in > are on separate lines. This keeps the commands from wrapping when there is a > long path in the prompt. It makes it easy to select command text with a mouse > and to read without dealing with line wrap which I find rather irritating. > > How would I do this in PS? > > And yes, I'm an old UNIX hack that now has to deal with bronze age command > line terminals like PS and cmd and am used to BASH or tcsh. > -- > Jack of All Trades, Master of None |
| My System Specs |
| 09-06-2007 | #3 |
| | Re: customizing the command prompt There is another thread on this titled Powershell Prompt from Sept 2nd. It has some great info. "flyfisher1952" <flyfisher1952@xxxxxx> wrote in message news:453BE4ED-7890-4857-840C-58EC6D04B1C2@xxxxxx Quote: >I am looking for a way to customize the command prompt in PS. In cmd.exe I > can use $_$p$_ to create a prompt where the path and the text that I type > in > are on separate lines. This keeps the commands from wrapping when there is > a > long path in the prompt. It makes it easy to select command text with a > mouse > and to read without dealing with line wrap which I find rather irritating. > > How would I do this in PS? > > And yes, I'm an old UNIX hack that now has to deal with bronze age command > line terminals like PS and cmd and am used to BASH or tcsh. > -- > Jack of All Trades, Master of None |
| My System Specs |
| 09-06-2007 | #4 |
| | Re: customizing the command prompt Search for "Powershell prompt" in this newsgroup. Its about 4 days old (02/09/2007) You'll find there what you need. BTW, welcome to world of PowerShell ![]() Shay http://scriptolog.blogspot.com Quote: > I am looking for a way to customize the command prompt in PS. In > cmd.exe I can use $_$p$_ to create a prompt where the path and the > text that I type in are on separate lines. This keeps the commands > from wrapping when there is a long path in the prompt. It makes it > easy to select command text with a mouse and to read without dealing > with line wrap which I find rather irritating. > > How would I do this in PS? > > And yes, I'm an old UNIX hack that now has to deal with bronze age > command line terminals like PS and cmd and am used to BASH or tcsh. > |
| My System Specs |
| 09-06-2007 | #5 |
| | RE: customizing the command prompt Have a look in the profile.ps1 in the examples folder of your PowerShell installation folder C:\Windows\System32\WindowsPowerShell\v1.0\Examples it has an example of a prompt function -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "ebgreen" wrote: Quote: > Well the short version is that you create a function in your profile named > Prompt. Whatever this function outputs or writes to the host will become your > ... well ... prompt. > > "flyfisher1952" wrote: > Quote: > > I am looking for a way to customize the command prompt in PS. In cmd.exe I > > can use $_$p$_ to create a prompt where the path and the text that I type in > > are on separate lines. This keeps the commands from wrapping when there is a > > long path in the prompt. It makes it easy to select command text with a mouse > > and to read without dealing with line wrap which I find rather irritating. > > > > How would I do this in PS? > > > > And yes, I'm an old UNIX hack that now has to deal with bronze age command > > line terminals like PS and cmd and am used to BASH or tcsh. > > -- > > Jack of All Trades, Master of None |
| My System Specs |
![]() |
| Thread Tools | |
| |
| Similar Threads for: customizing the command prompt | ||||
| Thread | Forum | |||
Command Prompt | System Security | |||
| Command Prompt | Tutorials | |||
Make a command prompt run a command as soon as it opens? | General Discussion | |||
| Customizing the Command Prompt using Powershell | PowerShell | |||
| Command prompt "COPY" command not working in brand new Windows Vis | Vista file management | |||