How to hide path in vs code terminal?

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

3 answers

Sort by: Most helpful
  1. Viorel 109.9K Reputation points
    2021-11-19T11:16:07.367+00:00

    Try entering this command into Terminal window:

    function prompt( ) {">"}

    4 people found this answer helpful.

  2. Shamim Ahmed 16 Reputation points
    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",

    3 people found this answer helpful.

  3. Devisetti Sreeja 0 Reputation points
    2023-06-21T08:51:43.2+00:00

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

    0 comments No comments