On Fri 13 Dec 2019 at 14:36:09 (-0500), Greg Wooledge wrote: > 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.
Could \D{format} not do that? Mind you, I'm surprised a prompt needs the month and year. I would have thought the day of the week would be more useful. Cheers, David.