Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-16 Thread Greg Wooledge
On Fri, Dec 13, 2019 at 04:50:18PM -0600, David Wright wrote: > > PS1='\u@\h $(date +"%d %b %Y %H:%M:%S") :\w\$ ' > > Could \D{format} not do that? Oh, good catch. I've... never used that before. ;-) I scanned the PROMPTING section of the man page too quickly and only saw the \t \T \@ \A

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread Vipul
> if [ "$color_prompt" = yes ]; then > > PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\$ > ' You forgot to add "\d", in PS1 value, that explains different behavior of prompt in console and Guake. May be, this could fix the problem if [

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread David Wright
On Fri 13 Dec 2019 at 14:36:09 (-0500), Greg Wooledge wrote: > On Fri, Dec 13, 2019 at 07:20:53PM +, 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 >

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread Dan Ritter
shirish ??? wrote: > at bottom :- > > On 13/12/2019, Dan Ritter wrote: > > shirish ??? wrote: > >> Dear all, > >> > >> Can somebody share how can I have a common prompt which is ok both by > >> bash and guake ? > >> > >> bash is - > >> > >> $ guake --version > >> Guake

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread shirish शिरीष
at bottom :- On 13/12/2019, Dan Ritter wrote: > shirish ??? wrote: >> Dear all, >> >> Can somebody share how can I have a common prompt which is ok both by >> bash and guake ? >> >> bash is - >> >> $ guake --version >> Guake Terminal: 3.6.3 >> VTE: 0.58.2 >> VTE runtime: 0.58.2 >>

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread Greg Wooledge
On Fri, Dec 13, 2019 at 07:20:53PM +, 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

Re: how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread Dan Ritter
shirish ??? wrote: > Dear all, > > Can somebody share how can I have a common prompt which is ok both by > bash and guake ? > > bash is - > > $ guake --version > Guake Terminal: 3.6.3 > VTE: 0.58.2 > VTE runtime: 0.58.2 > Gtk: 3.24.13 > guake is a terminal, not a shell. What

how to have a common prompt in bash and guake so I can view date and time as part of prompt ?

2019-12-13 Thread shirish शिरीष
Dear all, Can somebody share how can I have a common prompt which is ok both by bash and guake ? bash is - $ bash -version GNU bash, version 5.0.11(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later

Re: Temporary color prompt in bash script

2019-09-03 Thread David Wright
; > > execute a script > > print a string > > Are you actually able to discern the OP's desires? I can't. I found > everything they said in this thread completely impenetrable. At first > I thought they wanted to write a script that would change the bash > prompt by

Re: Temporary color prompt in bash script

2019-09-03 Thread Greg Wooledge
e OP's desires? I can't. I found everything they said in this thread completely impenetrable. At first I thought they wanted to write a script that would change the bash prompt by setting the PS1 variable > If you make your screen narrow before you cut and paste, you won't end > up with

Re: Temporary color prompt in bash script

2019-09-03 Thread David Wright
On Tue 03 Sep 2019 at 15:07:43 (+), Larry Dighera wrote: > On Mon, 02 Sep 2019 08:48:50 +0200, Computer Planet > > wrote: > > >Is It possible to print of a string at the exit of a bash script? > > Have a look at `man bash` and search for 'trap.' Trap is designed to break the sequential

Fw: Temporary color prompt in bash script

2019-09-03 Thread Larry Dighera
On Mon, 02 Sep 2019 08:48:50 +0200, Computer Planet wrote: >Is It possible to print of a string at the exit of a bash script? Have a look at `man bash` and search for 'trap.' trap [-lp] [[arg] sigspec ...]               The command arg is to be read and executed when the shell receives

Re: Temporary color prompt in bash script

2019-09-02 Thread David Wright
On Mon 02 Sep 2019 at 08:48:50 (+0200), Computer Planet wrote: > Thanks guys, > but this is not the solution I'm looking for ... It's always nice to get feedback on why, so that we're more likely to understand similar questions in future. For example, you never really explained whether "command

Re: Temporary color prompt in bash script

2019-09-02 Thread tomas
On Mon, Sep 02, 2019 at 09:30:44AM +0200, Thomas Schmitt wrote: > Hi, > > Computer Planet wrote: > > Is It possible to print of a string at the exit of a bash script? > > e.g.: user@mypc: # bash script has just finished! [prompt] > > with the prompt that remains immediately after the string

Re: Temporary color prompt in bash script

2019-09-02 Thread Thomas Schmitt
Hi, Computer Planet wrote: > Is It possible to print of a string at the exit of a bash script? > e.g.: user@mypc: # bash script has just finished! [prompt] > with the prompt that remains immediately after the string printed. Do you mean something like this ? $ echo -n 'user@mypc: # bash

Re: Temporary color prompt in bash script

2019-09-02 Thread tomas
On Mon, Sep 02, 2019 at 08:48:50AM +0200, Computer Planet wrote: > Thanks guys, > but this is not the solution I'm looking for ... > Now, I ask the question in other terms: > Is It possible to print of a string at the exit of a bash script? Hm. You mean echo Still a bit confused about where

Re: Temporary color prompt in bash script

2019-09-02 Thread Computer Planet
Thanks guys, but this is not the solution I'm looking for ... Now, I ask the question in other terms: Is It possible to print of a string at the exit of a bash script? e.g.: user@mypc: # bash script has just finished! [prompt] with the prompt that remains immediately after the string printed.

Re: Temporary color prompt in bash script

2019-09-01 Thread tomas
On Sun, Sep 01, 2019 at 03:22:32PM -0400, Lee wrote: [...] > You have to source the script instead of running it. Yes, exactly. > I'm not entirely clear about a new shell gets it's own env that > disappears when the shell exits thing, but try this: It's not only a shell thing. It's a basic

Re: Temporary color prompt in bash script

2019-09-01 Thread Lee
On 9/1/19, Computer Planet wrote: > Hi guys! > I'm trying, trying and trying but... > > How I Can put in hte end of a bash script this command: > PS1="\[\e]0;\u@\h: > \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w > #\[\033[91m\] " > so that after

Re: Temporary color prompt in bash script

2019-09-01 Thread David Wright
> command no problem, write in red until exit or reboot. Rather than figure out what exactly you're putting into your bash prompt, I'll just post mine, for my host that uses red, and let you pick out anything you want. Localcolor comes from a separate subfile. The warning is to remind me

Temporary color prompt in bash script

2019-09-01 Thread Computer Planet
Hi guys! I'm trying, trying and trying but... How I Can put in hte end of a bash script this command: PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w #\[\033[91m\] " so that after finishing the script the prompt will write in red...?

Re: Prompt do bash

2005-10-27 Thread João Salvatti
Valeu a todos, mas Bruno era realmente isso que eu pesquisava!!! vou aplicar o patch e ver se funciona!! Falow. On 10/26/05, Bruno de Oliveira Schneider [EMAIL PROTECTED] wrote: On 10/26/05, João Salvatti wrote: já pesquisei na internet e em alguns tutoriais sobre o bash mas não consegui

Re: Prompt do bash

2005-10-27 Thread Datacom - Tavares
On Wed, 2005-10-26 at 10:23 -0300, João Salvatti wrote: Olá pessoal da lista, já pesquisei na internet e em alguns tutoriais sobre o bash mas não consegui nada que realmente me ajudasse. Gostaria de saber se tem como alterar o indicado de posição (na verdade não sei o nome daquele negócio

Re: Prompt do bash

2005-10-27 Thread pmarc
Uma curiosidade.. Qual a vantagem disto? :) é k o negocim que fika piskandu imbaixo da tela é taum bunitim oOOo Ainda bem que o brasil é um estado de direito senão gente como eu estaria apodrecendo em alguma cadeia. -- Paulo Marcondes http://rj.debianbrasil.org

Prompt do bash

2005-10-26 Thread João Salvatti
Olá pessoal da lista, já pesquisei na internet e em alguns tutoriais sobre o bash mas não consegui nada que realmente me ajudasse. Gostaria de saber se tem como alterar o indicado de posição (na verdade não sei o nome daquele negócio direito), mas vou exemplificar: [EMAIL PROTECTED]:~$ | -- esta

Re: Prompt do bash

2005-10-26 Thread Marcelo Loiaco
@lists.debian.org Sent: Wednesday, October 26, 2005 11:23 AM Subject: Prompt do bash Olá pessoal da lista, já pesquisei na internet e em alguns tutoriais sobre o bash mas não consegui nada que realmente me ajudasse. Gostaria de saber se tem como alterar o indicado de posição (na verdade não sei o nome

Re: Prompt do bash

2005-10-26 Thread Leandro Ferreira
No dia 26/10/2005 às 10:23, João Salvatti [EMAIL PROTECTED] escreveu: já pesquisei na internet e em alguns tutoriais sobre o bash mas não consegui nada que realmente me ajudasse. Gostaria de saber se tem como alterar o indicado de posição (na verdade não sei o nome daquele negócio direito),

Re: Prompt do bash

2005-10-26 Thread Bruno de Oliveira Schneider
On 10/26/05, João Salvatti wrote: já pesquisei na internet e em alguns tutoriais sobre o bash mas não consegui nada que realmente me ajudasse. Gostaria de saber se tem como alterar o indicado de posição (na verdade não sei o nome daquele negócio direito), mas vou exemplificar: [EMAIL

???current directory in prompt in bash???

1998-12-08 Thread Rich Hartman
Is there a way to have bash include the current directory in the prompt of bash? Actually, let me re-phrase that my root account DOES include the current directory in the the prompt, but I have no idea why or how... I've tried to copy my root's .bash_profile to my regular-user's

Re: ???current directory in prompt in bash???

1998-12-08 Thread David Z. Maze
Rich Hartman [EMAIL PROTECTED] writes: Rich Is there a way to have bash include the current directory in the Rich prompt of bash? Yes. See bash(1), under PROMPTING. -- _ / \ Dad was reading a book called | David Maze

Re: ???current directory in prompt in bash???

1998-12-08 Thread Stephan Engelke
Hi Rich, On Tue, Dec 08, 1998 at 08:38:00AM +, Rich Hartman wrote: Is there a way to have bash include the current directory in the prompt of bash? Actually, let me re-phrase that my root account DOES include the current directory in the the prompt, but I have no idea why or how

Re: ???current directory in prompt in bash???

1998-12-08 Thread Kent West
At 08:38 AM 12/8/1998 +, Rich Hartman wrote: Is there a way to have bash include the current directory in the prompt of bash? Actually, let me re-phrase that my root account DOES include the current directory in the the prompt, but I have no idea why or how... I've tried to copy my

Re: ???current directory in prompt in bash???

1998-12-08 Thread Mitch Blevins
Rich Hartman wrote: Is there a way to have bash include the current directory in the prompt of bash? Actually, let me re-phrase that my root account DOES include the current directory in the the prompt, but I have no idea why or how... I've tried to copy my root's .bash_profile to my

Re: ???current directory in prompt in bash???

1998-12-08 Thread wtopa
Subject: ???current directory in prompt in bash??? Date: Tue, Dec 08, 1998 at 08:38:00AM + In reply to:[EMAIL PROTECTED] Quoting [EMAIL PROTECTED]([EMAIL PROTECTED]): Is there a way to have bash include the current directory in the prompt of bash? Actually, let me re

Re: ???current directory in prompt in bash???

1998-12-08 Thread wtopa
Subject: Re: ???current directory in prompt in bash??? Date: Tue, Dec 08, 1998 at 11:29:18AM -0500 In reply to:Wayne Topa Quoting Wayne Topa([EMAIL PROTECTED]): Subject: ???current directory in prompt in bash??? Date: Tue, Dec 08, 1998 at 08:38:00AM +

Re: Prompt in Bash [fixed]

1997-09-07 Thread Rob Browning
Will Lowe [EMAIL PROTECTED] writes: Yup, kill the eval and life is good. Thanks, Mr. Browning. You're welcome, but sheesh, call me Rob : One final word for those who were following this thread. This if [ ${PS1:-UNSET} = UNSET ] should have been if [ ${PS1:-UNSET} = UNSET ] Without

Re: Prompt in Bash

1997-09-06 Thread Will Lowe
If I do this: On 5 Sep 1997, Rob Browning wrote: set_titlebar () { echo -n ]2;$*; } export -f set_titlebar And then someplace call set_titlebar, I just get ^[]2;$*^G echoed to my terminal. It doesn't ever set the titlebar. I'm using rxvt. Suggestions?

Re: Prompt in Bash

1997-09-06 Thread Rob Browning
by a G or [. To type these into a file in emacs, you can use C-q C-g for ^G and C-q C-[ for ^[. If this doesn't make sense to you, ask and I'll explain in more detail. You can get the same effect from a bash prompt with C-q Cv: quoted-insert (C-q, C-v) Add the next character

Re: Prompt in Bash

1997-09-06 Thread Michael Harnois
Jens B. Jorgensen [EMAIL PROTECTED] writes: Gonzalo A. Diethelm wrote: A while ago, somebody in this forum posted how to make the current working directory appear on the title bar in an xterm. I lost that article somehow; could the author repost it? Thanks in advance... Well, you

Re: Prompt in Bash

1997-09-06 Thread Michael Harnois
Since you're providing enlightenment ... I ran into a problem when I tried to modify your script for my own preferences. Specifically, when I tried to change the value of PS1 to give a colorized prompt. The string I began with was

Re: Prompt in Bash

1997-09-06 Thread Will Lowe
On 5 Sep 1997, Rob Browning wrote: Will Lowe [EMAIL PROTECTED] writes: set_titlebar () { echo -n ]2;$*; } Here ^[ and ^G actually have to be real control characters not a ^ Ok, now I get a [EMAIL PROTECTED]:~: command not found [EMAIL PROTECTED]:~ is what should end up in the

Re: Prompt in Bash

1997-09-06 Thread Rob Browning
Michael Harnois [EMAIL PROTECTED] writes: Since you're providing enlightenment ... Don't know if I'd go that far : This string works find in a straight .bashrc. However, when I use it in your file, it works fine on a login shell. When I start a subshell, though, I get I'd have to see the

Re: Prompt in Bash

1997-09-06 Thread Rob Browning
Will Lowe [EMAIL PROTECTED] writes: Ok, now I get a [EMAIL PROTECTED]:~: command not found [EMAIL PROTECTED]:~ is what should end up in the titlebar, but it's instead somehow being evaluated. Any other clues? Email me a snippet that causes the problem, and I'll check it out. If a

Re: Prompt in Bash

1997-09-06 Thread Gonzalo A. Diethelm
Rob, thanks a lot for your script. I think there is a small glitch, though: if [ ${PS1:-UNSET} = UNSET ] then INTERACTIVE_SHELL=F else INTERACTIVE_SHELL=T if [ $TERM = xterm -o $TERM = rxvt ] then set_titlebar () { echo -n ]2;$*; } export -f

Re: Prompt in Bash

1997-09-06 Thread Rob Browning
Gonzalo A. Diethelm [EMAIL PROTECTED] writes: Rob, thanks a lot for your script. I think there is a small glitch, though: Not surprised : export PS1='\n\!\$ ' export PROMPT_COMMAND='eval set_titlebar [EMAIL PROTECTED]:`my_dirname`' When I did this, the title bar showed the

Re: Prompt in Bash [fixed]

1997-09-06 Thread Will Lowe
On 6 Sep 1997, Rob Browning wrote: Gonzalo A. Diethelm [EMAIL PROTECTED] writes: Rob, thanks a lot for your script. I think there is a small glitch, though: export PROMPT_COMMAND='eval set_titlebar [EMAIL PROTECTED]:`my_dirname`' Yup, kill the eval and life is good. Thanks, Mr.

Re: Prompt in Bash

1997-09-05 Thread Gonzalo A. Diethelm
Doro Ferrante wrote: Does anybody know how do I change colors in a bash prompt. I can do it in tcsh, but no succes with bash... (even after reading the man). #b/w prompt #PS1=\\h\\$ \\u [\\w] #Pretty color prompt. Comment it out if your terminal doesn't support ANSI co #We

Re: Prompt in Bash

1997-09-05 Thread Rob Browning
Ask and ye shall receive : This is a cut-down version of my bashrc. It also shows a trick to get around the problem with some shells actually being login shells, but not calling .bash_login (i.e. X login shells). I just symlink my .bash_login to my .bashrc, and let .bashrc handle figuring out

Re: Prompt in Bash

1997-09-05 Thread Jens B. Jorgensen
: a command. Bash allows these prompt strings to be cus­ tomized by inserting a number of backslash-escaped special characters that are decoded as follows: \t the current time in HH:MM:SS format \d the date in Weekday Month Date

Re: Prompt in Bash

1997-09-05 Thread Lawrence
Is it possible to do it in tcsh? Rob Browning wrote: Ask and ye shall receive : This is a cut-down version of my bashrc. It also shows a trick to get around the problem with some shells actually being login shells, but not calling .bash_login (i.e. X login shells). I just symlink my

Re: Prompt in Bash

1997-09-05 Thread Rob Browning
Jens B. Jorgensen [EMAIL PROTECTED] writes: Well, you should have RTFMpage, but here's the excerpt you want: That seems a little over-harsh. a command. Bash allows these prompt strings to be cus­ tomized by inserting a number of backslash-escaped special characters

Re: Prompt in Bash

1997-09-05 Thread Rob Browning
Lawrence [EMAIL PROTECTED] writes: Is it possible to do it in tcsh? Good question. I've never used tcsh, but I would guess so. The key thing to note is this escape sequence which changes the titlebar: echo -n ]2;$* or with a fixed string for illustration: echo -n ]2;My new

Re: Prompt in Bash

1997-09-05 Thread Steve Witt
On Sat, 6 Sep 1997, Lawrence wrote: Is it possible to do it in tcsh? Yes, this is from the O'Reilly book Using csh tcsh. I use this at work on SunOS 4.1.4 running tcsh. There are two files involved, your .cshrc (or .tchsrc) and another little file ~/.settitle. = .cshrc ==

Re: Prompt in Bash

1997-08-23 Thread Dave Cinege
On Fri, 22 Aug 1997 12:32:35 -0300 (EST), Daniel Doro Ferrante wrote: Hi All ! Does anybody know how do I change colors in a bash prompt. I can do it in tcsh, but no succes with bash... (even after reading the man). #b/w prompt #PS1=\\h\\$ \\u [\\w] #Pretty color prompt

Prompt in Bash

1997-08-22 Thread Daniel Doro Ferrante
Hi All ! Does anybody know how do I change colors in a bash prompt. I can do it in tcsh, but no succes with bash... (even after reading the man). Thanks in advance. Daniel