Windows Vista Forums

Prompt when using PUSHD
  1. #1


    Synapse Syndrome Guest

    Prompt when using PUSHD

    With CMD, by adding the System Variable for PROMPT: $m$p$g, can have the
    whole network address when using PUSHD.

    eg.

    C:\>pushd \\harthouse\C$

    \\harthouse\C$ X:\>

    With PowerShell, it seems that it already shows the full path in the prompt,
    but I am not sure if that is because it is using the System Variable that I
    made for CMD.

    e.g

    PS C:\> pushd \\harthouse\C$
    PS Microsoft.PowerShell.Core\FileSystem::\\harthouse\C$>

    I noticed that it does not seem to make a temporary mapped network drive,
    like using PUSHD in CMD does, and it does not appear in My Computer. This
    is fine, as I do not really use that anyway.



    But how do I shorten that silly prompt? I don't really want the PS there,
    which is there all the time, but what about the
    'Microsoft.PowerShell.Core\FileSystem' bit? Is there any point of that?

    Cheers

    ss.



      My System SpecsSystem Spec

  2. #2


    Jeff Guest

    Re: Prompt when using PUSHD

    On Aug 29, 10:46*am, "Synapse Syndrome" <syna...@xxxxxx>
    wrote:

    > With CMD, by adding the System Variable for PROMPT: $m$p$g, can have the
    > whole network address when using PUSHD.
    >
    > eg.
    >
    > C:\>pushd \\harthouse\C$
    >
    > \\harthouse\C$ X:\>
    >
    > With PowerShell, it seems that it already shows the full path in the prompt,
    > but I am not sure if that is because it is using the System Variable thatI
    > made for CMD.
    >
    > e.g
    >
    > PS C:\> pushd \\harthouse\C$
    > PS Microsoft.PowerShell.Core\FileSystem::\\harthouse\C$>
    >
    > I noticed that it does not seem to make a temporary mapped network drive,
    > like using PUSHD in CMD does, and it does not appear in My Computer. *This
    > is fine, as I do not really use that anyway.
    >
    > But how do I shorten that silly prompt? *I don't really want the PS there,
    > which is there all the time, but what about the
    > 'Microsoft.PowerShell.Core\FileSystem' bit? *Is there any point of that?
    >
    > Cheers
    >
    > ss.
    ss.,

    The PowerShell prompt is highly customizable; all you need to do is
    create a function call "prompt" in the global scope, and whatever that
    function outputs becomes your prompt. Here is a simple example that
    shows the current location, but doesn't include the
    'Microsoft.PowerShell.Core\FileSystem' part for UNC paths:

    function prompt
    {
    "$( (Get-Location).ProviderPath )>"
    }

    You can put all kinds of good stuff in there.

    Have fun.

    Jeff

      My System SpecsSystem Spec

  3. #3


    Synapse Syndrome Guest

    Re: Prompt when using PUSHD

    "Jeff" <jeff.hillman@xxxxxx> wrote in message
    news:789c5820-1a57-4049-9044-d8a7aaaaad4c@xxxxxx

    > With CMD, by adding the System Variable for PROMPT: $m$p$g, can have the
    > whole network address when using PUSHD.
    >
    > eg.
    >
    > C:\>pushd \\harthouse\C$
    >
    > \\harthouse\C$ X:\>
    >
    > With PowerShell, it seems that it already shows the full path in the
    > prompt,
    > but I am not sure if that is because it is using the System Variable that
    > I
    > made for CMD.
    >
    > e.g
    >
    > PS C:\> pushd \\harthouse\C$
    > PS Microsoft.PowerShell.Core\FileSystem::\\harthouse\C$>
    >
    > I noticed that it does not seem to make a temporary mapped network drive,
    > like using PUSHD in CMD does, and it does not appear in My Computer. This
    > is fine, as I do not really use that anyway.
    >
    > But how do I shorten that silly prompt? I don't really want the PS there,
    > which is there all the time, but what about the
    > 'Microsoft.PowerShell.Core\FileSystem' bit? Is there any point of that?
    >
    > Cheers
    >
    > ss.
    The PowerShell prompt is highly customizable; all you need to do is
    create a function call "prompt" in the global scope, and whatever that
    function outputs becomes your prompt. Here is a simple example that
    shows the current location, but doesn't include the
    'Microsoft.PowerShell.Core\FileSystem' part for UNC paths:

    function prompt
    {
    "$( (Get-Location).ProviderPath )>"
    }

    You can put all kinds of good stuff in there.
    ----------------------------------------------------------------------

    Belated thanks!

    ss.



      My System SpecsSystem Spec

  4. #4


    Jeff Guest

    Re: Prompt when using PUSHD

    On Sep 19, 4:02*pm, "Synapse Syndrome" <syna...@xxxxxx>
    wrote:

    > "Jeff" <jeff.hill...@xxxxxx> wrote in message
    >
    > news:789c5820-1a57-4049-9044-d8a7aaaaad4c@xxxxxx
    >
    >
    >

    > > With CMD, by adding the System Variable for PROMPT: $m$p$g, can have the
    > > whole network address when using PUSHD.
    >

    > > eg.
    >

    > > C:\>pushd \\harthouse\C$
    >

    > > \\harthouse\C$ X:\>
    >

    > > With PowerShell, it seems that it already shows the full path in the
    > > prompt,
    > > but I am not sure if that is because it is using the System Variable that
    > > I
    > > made for CMD.
    >

    > > e.g
    >

    > > PS C:\> pushd \\harthouse\C$
    > > PS Microsoft.PowerShell.Core\FileSystem::\\harthouse\C$>
    >

    > > I noticed that it does not seem to make a temporary mapped network drive,
    > > like using PUSHD in CMD does, and it does not appear in My Computer. This
    > > is fine, as I do not really use that anyway.
    >

    > > But how do I shorten that silly prompt? I don't really want the PS there,
    > > which is there all the time, but what about the
    > > 'Microsoft.PowerShell.Core\FileSystem' bit? Is there any point of that?
    >

    > > Cheers
    >

    > > ss.
    >
    > The PowerShell prompt is highly customizable; all you need to do is
    > create a function call "prompt" in the global scope, and whatever that
    > function outputs becomes your prompt. *Here is a simple example that
    > shows the current location, but doesn't include the
    > 'Microsoft.PowerShell.Core\FileSystem' part for UNC paths:
    >
    > function prompt
    > {
    > * * "$( (Get-Location).ProviderPath )>"
    >
    > }
    >
    > You can put all kinds of good stuff in there.
    > ----------------------------------------------------------------------
    >
    > Belated thanks!
    >
    > ss.
    Better late than never.

    Jeff

      My System SpecsSystem Spec

Prompt when using PUSHD problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change to C:\ Prompt from C:\Users\username> Prompt cyberbiker General Discussion 2 27 Nov 2009
cmd prompt Fuzzynutts General Discussion 3 30 Jul 2009
Uac prompt hdbg62 General Discussion 0 04 Nov 2008
Log in prompt Bu Live Mail 3 08 Sep 2008
Prompt Robert Fuchs PowerShell 5 16 Aug 2006