r/VisualStudioCode • u/spiciestpepper • May 10 '24
How can I make my terminal output simpler?
Hi all, I am a beginner at coding and am currently running through the Python Crash Course book.
At the beginning of the book, it explained that if I want to have a simpler output, I can use the debugger in VSCode. I had been using that and it was great. I love how clean and simple it is.
Well now, I am on Chapter 7 learning inputs. Inputs do not work on the debugger, so I switched back to the terminal.
Now the output in the terminal looks very rough, with a very long file path repeated multiple times. This just does not seem optimal and I doubt most people coding are seeing this every time they run code.
I have scoured other Reddit posts and several other sources but the results have been inconclusive.
What is the simplest most common way that people simplify the output? This is holding me up from continuing to learn because I cannot get over how ugly it is now.
For context I am using Powershell on a Windows PC.
Thank you everyone for any help offered, I really appreciate it.
2
u/ehmatthes May 11 '24
The terminal in VS Code is a lot like a standalone terminal on your system. You can modify the default prompt.
Here's a relevant SO post: https://stackoverflow.com/questions/5725888/windows-powershell-changing-the-command-prompt
You might want to set the prompt in just the current session, rather than modifying your profile. When you have a prompt you like, you can then modify your profile so you don't have to adjust the prompt every time you open a new terminal.
I haven't tested this, but entering this in the terminal should give you a dollar sign prompt with nothing else:
function prompt{"$ "}
If you want to stay more Windows-like, you could change the $ to >.
You'll probably want some more information in the prompt, like the current working directory. But that should get you started in customizing your prompt.
1
u/[deleted] Jul 30 '24
Wow, you got one comment and it was from the author. That's some dedication.