Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?
On Fri, Dec 13, 2019 at 07:20:53PM +0000, shirish शिरीष wrote:
> Can somebody share how can I have a common prompt which is ok both by
> bash and guake ?
guake...? No idea what that is. apt-cache says it's a terminal. So
I'm just going to assume that it works like any other terminal -- bash
runs inside it. The prompt is displayed by bash. Therefore, the "guake"
part of the question can be ignored.
> which is not bad but I would like it to be something like this -
>
> shirish@debian 14 Dec 2019 00:43:04 :~$
PS1='\u@\h $(date +"%d %b %Y %H:%M:%S") :\w\$ '
Bash actually has the ability to show the time in the prompt without
calling date(1), but you asked for an unusual date format, so I had to
resort to the command substitution.
Reply to: