Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Guido's already answered your specific questionanswered your specific question, but just a note:

In addition, you could also set your scrolling region to be from the second line, so that scrolling doesn't erase that line.

PS1="\[\e[s\e[2;0r\e[H\e[0;47m\e[K\e[1;34m$LP\t\e[0m\e[u\]<\u@\h \W>\$ "

(though personally, I wouldn't to this kind of thing at the shell level, but for instance using screen and its hardstatus feature)

Guido's already answered your specific question, but just a note:

In addition, you could also set your scrolling region to be from the second line, so that scrolling doesn't erase that line.

PS1="\[\e[s\e[2;0r\e[H\e[0;47m\e[K\e[1;34m$LP\t\e[0m\e[u\]<\u@\h \W>\$ "

(though personally, I wouldn't to this kind of thing at the shell level, but for instance using screen and its hardstatus feature)

Guido's already answered your specific question, but just a note:

In addition, you could also set your scrolling region to be from the second line, so that scrolling doesn't erase that line.

PS1="\[\e[s\e[2;0r\e[H\e[0;47m\e[K\e[1;34m$LP\t\e[0m\e[u\]<\u@\h \W>\$ "

(though personally, I wouldn't to this kind of thing at the shell level, but for instance using screen and its hardstatus feature)

Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

Guido's already answered your specific question, but just a note:

In addition, you could also set your scrolling region to be from the second line, so that scrolling doesn't erase that line.

PS1="\[\e[s\e[2;0r\e[H\e[0;47m\e[K\e[1;34m$LP\t\e[0m\e[u\]<\u@\h \W>\$ "

(though personally, I wouldn't to this kind of thing at the shell level, but for instance using screen and its hardstatus feature)