Sometimes it can be very confused work with he terminal because we execute several commands and it is not clear where the results linked to one command end and where the other results begin.
An easy way to fix this problem is to add a spreader bar that allows divide the different commands and their results easily. |
Create a blank file named .bash_ps1 in your user folder:
nano .bash_ps1
Then, copy the following text into the file:
...
Save the changes, close the terminal and reopen it. Voila!
Source: Lifehacker
Good trick, the net will serve me
Great. Simple and easy! I loved the result ...
Excellent! (a lo burns!) thanks!
The article is very good, but it does not suit me. Steps that I do 1st in my main folder (llulius) and there they hang (downloads, documents, desktop, etc) I create an empty file and when giving it the name I put it (nano .bash_ps1), edit the folder and copy all the text, save the text and I close the file. I open a terminal and execute (nano ~ / .bashrc) an editor opens inside the terminal I put the text if [-f "$ HOME / .bash_ps1"]; then
. "$ HOME / .bash_ps1"
fi
at the end of everything and I save with control or and I leave with x
I open the terminal again and everything remains the same as the song of Julio Iglesias
Thanks for reading the article and see what I do wrong
I really like it, but I managed to do better with ZSH, it has prompts that can be put on either side of the terminal and that helps me better.
Thanks Eärendil for this article. I just tried it and it worked flawlessly on the normal console and in Guake! I think it will help me a lot.
Thanks Eärendil for this article. I just tried it and it worked flawlessly on the normal console and in Guake! I think it will help me a lot.
Try again. It should work. It worked for me. : S
Cheers! Paul.
You're welcome! I'm glad it serves! 🙂
Cheers! Paul.
I copy it! Indeed, my terminals tend to end in gibberish.
Great! It seemed that I was not walking but yes =)
A great trick without a doubt ^^
Thanks for sharing.
I followed all the steps and did not walk.
The truth is very good = D
It didn't work for me either, so I modified the script and got it to work in normal user, that is, when superuser is entered with su, the lines no longer appear. In the end the script was like this:
function prompt_command {
if [[$ COLUMNS = ""]];
then
return
fi
let fillsize = $ {COLUMNS} -9
fill = »»
while ["$ fillsize" -gt "0"]
do
fill = »- $ {fill}»
let fillsize = $ {fillsize} -1
done
time = `/ bin / date +»% T »`
echo "$ fill $ hour"
}
PROMPT_COMMAND = prompt_command
It was much shorter, I removed several things and it works for me without problems. I do not modify the variable PS1 but use the one that the system creates by default.
I do this on a linux arch.
Good date!
Excellent!
Very comfortable