How to hide path in vs code terminal?

Aditya Saxena 1 Reputation point
2021-11-19T10:43:01.11+00:00

Can someone guide me if there's a way to hide path from the vs code terminal and still be able to receive user inputs?

150967-2021-11-19.png

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 82,746 Reputation points
    2021-11-19T11:16:07.367+00:00

    Try entering this command into Terminal window:

    ā€ƒfunction prompt( ) {">"}


  2. Shamim Ahmed 1 Reputation point
    2022-01-21T00:31:03.993+00:00

    It seems you are using "Code Runner" extension in VS Code.
    You can simply clear these extra text by adding the command for clearing the console in "executorMap" of code runner.

    Go to Settings.json > Search for "code-runner.executorMap" > search language (C/C++)

    change it to :

    "c": "cls && cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    "cpp": "cls && cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",