File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
base/applications/network/netsh Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,23 @@ InterpretScript(
220220}
221221
222222
223+ VOID
224+ PrintPrompt (
225+ PCONTEXT_ENTRY pContext )
226+ {
227+ if (pContext == pRootContext )
228+ {
229+ ConPuts (StdOut , L"netsh" );
230+ }
231+ else
232+ {
233+ PrintPrompt (pContext -> pParentContext );
234+ ConPuts (StdOut , L" " );
235+ ConPuts (StdOut , pContext -> pszContextName );
236+ }
237+ }
238+
239+
223240VOID
224241InterpretInteractive (VOID )
225242{
@@ -236,12 +253,7 @@ InterpretInteractive(VOID)
236253 memset (args_vector , 0 , sizeof (args_vector ));
237254
238255 /* Shown just before the input where the user places commands */
239- ConPuts (StdOut , L"netsh" );
240- if (pCurrentContext != pRootContext )
241- {
242- ConPuts (StdOut , L" " );
243- ConPuts (StdOut , pCurrentContext -> pszContextName );
244- }
256+ PrintPrompt (pCurrentContext );
245257 ConPuts (StdOut , L">" );
246258
247259 /* Get input from the user. */
You can’t perform that action at this time.
0 commit comments