NAME

write-prompt

SYNOPSIS

Write the prompt string to the host.

SYNTAX

write-prompt [<CommonParameters>]

DESCRIPTION

This is a wrapper for forcing the display of a changed prompt. It exists for use in script commands that change the current directory value, so they can upda
te the prompt appearance in the console.

PARAMETERS

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS

None.

OUTPUTS

None.

EXAMPLES

EXAMPLE 1

C:\PS>$path = "commandBars:/context menus/Project and Solution Context Menus/Project/Mount";
C:\PS>new-item $path -type button -value { 
        $selectedProjects | foreach { 
            pushd "projects:/$($_.PSChildName)"; 
            write-prompt; 
            invoke-item 'dte:/windows/studioshell';
        } 
    };


This example shows write-prompt being invoked to update the host prompt display as part of a context menu command script.

Last edited Dec 30, 2011 at 3:50 AM by beefarino, version 1

Comments

No comments yet.