[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changing PSI and PS0 leads to four characters at beginning of user input
From: |
lisa-asket |
Subject: |
Changing PSI and PS0 leads to four characters at beginning of user input |
Date: |
Sun, 4 Jul 2021 21:03:07 +0200 (CEST) |
Have been trying to set PS1 and PS0 for my terminal using tput but getting some
problems
tfb_normal=$(tput sgr0)
taf_red=$(tput setaf 9)
taf_cyan1=$(tput setaf 51)
taf_gold1=$(tput setaf 220)
PS1='\n${taf_cyan1}\u@\h:\n'
PS1=$PS1'+ ${taf_gold1}\w\n${taf_red}'
PS0='${tfb_normal}'$PS0 # use regular foreground color
This is what happens. I launch terminal and do a change directory, then do
`ls` and `ls -lrt`.
lisa@poca:
+ ~
cd ~/01cuneus/articles/short/advoc/proposals
lisa@poca:
+ ~/01cuneus/articles/short/advoc/proposals
ls
2018 2019 2020 2021
lisa@poca:
+ ~/01cuneus/articles/short/advoc/proposals
ls -lrt
total 16
drwxr-xr-x 6 lisa lisa 4096 янв 12 2019 2019
drwxr-xr-x 6 lisa lisa 4096 мая 23 2019 2018
drwxr-xr-x 5 lisa lisa 4096 июл 30 2020 2020
drwxrwxr-x 4 lisa lisa 4096 июн 24 08:54 2021
I then try to use the up and dorm arrow keys to navigate the previous commands.
Cannot understand how I get `cd ~/` at the beginning before the beginning
I do <up> to get
lisa@poca:
+ ~/01cuneus/articles/short/advoc/proposals
ls -lrt
Doing another <up> to get
lisa@poca:
+ ~/01cuneus/articles/short/advoc/proposals
ls
And another <up> to get
lisa@poca:
+ ~
cd ~/01cuneus/articles/short/advoc/proposals
But after that all cammands start from the fourth character
I do <down> to get
lisa@poca:
+ ~
cd ~/01cuneus/articles/short/advoc/proposals
lisa@poca:
+ ~/01cuneus/articles/short/advoc/proposals
cd ~/cd /home/lisa/Admir/source/texinfo
As one can see the first four colours stay at `cd ~/` and when I start writing
commands,
the cursor starts at column 5 with thu ferst four characters being `cd ~/`.
- Changing PSI and PS0 leads to four characters at beginning of user input,
lisa-asket <=
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Lawrence Velázquez, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, Greg Wooledge, 2021/07/04
- Re: Changing PSI and PS0 leads to four characters at beginning of user input, David, 2021/07/05
- Changing PSI and PS0 leads to four characters at beginning of user input, lisa-asket, 2021/07/05