How to hide path in vs code terminal?

Aditya Saxena 6 Reputation points

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.
4,418 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Viorel 109.9K Reputation points

    Try entering this command into Terminal window:

    function prompt( ) {">"}

    4 people found this answer helpful.

  2. Shamim Ahmed 16 Reputation points

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

    3 people found this answer helpful.

  3. Devisetti Sreeja 0 Reputation points

    For Python, you can use coderunner extension. I didn't work for me for C/C++.

    0 comments No comments