How to hide path in vs code terminal?

Aditya Saxena 1 Reputation point

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?


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

    Try entering this command into Terminal window:

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

  2. Shamim Ahmed 1 Reputation point

    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",