[PS1] prompt misaligned
When I go back in the command history, if a command is long, it shortens the prompt by 14 characters whatever the directory. Here is my PS1:
Code:
PS1="" # reset |
Is that on tty ? On a terminal emulator ? Which one ?
A bit more context could help to help... |
Quote:
Beyond that you do not tell us what distro you are on nor the $SHELL you are using so there is no way for most of us to even test and see what might be happening. That PS1 line does not work at all well in bash on my system. A quick google search for "how to change ps1 in linux" will give you several links and you can even change that search for the shell you are using. |
^ Yes please.
Quote:
But that's beside the point. 2 things:
|
The problem was the date: it was
Code:
PS1="$PS1\[\e[0m\]\[\e[48;5;95;38;5;214m\D{%d.%m@%H.%M.%S}\]" # date Code:
PS1="$PS1\[\e[0m\]\[\e[48;5;95;38;5;214m\]\D{%d.%m@%H.%M.%S}" # date Quote:
Quote:
The shell is bash on the remote, just checked with the command chck. The pages on ps1 don't give the same level of information: the basic ones give full explanation but not all options and the pages that give a broader choice of configuration don't tell the syntax to use them. Quote:
The reset is needed when 'bolding' and 'backgrounding' but for indentation readability, I put it everywhere. The only space I have is the last character, but thanks for the trick because I didn't know that |
Quote:
:thumbsup: |
All times are GMT -5. The time now is 03:30 PM. |