General TC > General TC Talk

Prompt

<< < (2/2)

TomyTurbos:
Well, after some experimentation I wound up with what I wanted by using this in '/home/tc/.profile':


--- Code: (bash) ---PS1='n\ ${RED}$(date "+%a %b %d %T")\n ${WHITE}\u@\h:\n ${BLUE}$PWD\/\n${GREEN}>> ${WHITE}'

--- End code ---

My prompt now shows as:
Day Month Date Time
User@Host
Current Directory
>>

Note:  These are indented by one space. The line in the middle is white.
Part of the reason for doing this was to make it easier to find the breakpoints when scrolling back through a long list of terminal output.

But during the process I noted some unusual behavior in aterm while using 'export' and testing this.  At some point the command became lengthy enough that it could no longer be edited without restarting. Backspace and Delete became Paste.

As I said above, I solved my problem and have no more concern for the matter,  but this reveals a fluke elsewhere in the system. I thought I should report it.

Rich:
Hi TomyTurbos

--- Quote from: TomyTurbos on February 18, 2019, 08:59:35 PM ---Well, after some experimentation I wound up with what I wanted by using this in '/home/tc/.profile':


--- Code: (bash) ---PS1='n\ ${RED}$(date "+%a %b %d %T")\n ${WHITE}\u@\h:\n ${BLUE}$PWD\/\n${GREEN}>> ${WHITE}'
--- End code ---

--- End quote ---

If that code snippet is accurate, then the  n\  at the beginning is a typo and might account for the unusual behavior you mentioned.
It should be  \n  if you intended to put a linefeed there.
 

TomyTurbos:
Yes, that is a typo.

Navigation

[0] Message Index

[*] Previous page

Go to full version