Re: sounds on wsl commendline
I'm glad that you are trying out a unix shell. I've used a linux
command line for three years now and I can say that it is very
fun. I use less and less graphical programs and use the command
line for more and more. Today I only use a mail program
(Thunderbird) and a web browser (Firefox) outside the terminal.
Command line applications are much more understandable, accessible
and customizable than graphical programs. It takes some more time
to learn it, but you learn what you are really doing rather than
how to use a complicated gui. WSL is also really awsum.
Anyway, on to your question. You want to know if the last commandsucceeded or not, quicly. In unix, the exit status of a command is denoted by a return code. If the return code is 0 the command was successful otherwise it failed. The simplest solution is to customize your prompt string so that it contains the return code of the last command.
I don't know what shell you are using. Most probably you are using bash but you can check that by issuing the command `echo $shell`. If the output is something similar to /bin/bash or /usr/bin/bash, you are good to go.
Now you should edit your .bashrc file located right under your home directory. Paste the following text at the bottom of the file:
Save the file and restart your shell. The prompt should now contain the return code in parenthesis at the start of the line.
Feel free to experiment with that code and if you have any questions feel free to ask.
On 6/22/2020 8:25 PM, UMIT ERDEM Yigitoglu wrote: