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 ] W

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

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 ba

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;$*"; } > expor

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

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

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

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 PS1="\\[\\e[1;31m\\]\h:\\[\\e[0m\\]\\[\\e[1;34m\\]

Re: Prompt in Bash

1997-09-05 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... > >

Re: Prompt in Bash

1997-09-05 Thread Rob Browning
Will Lowe <[EMAIL PROTECTED]> writes: > 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

Re: Prompt in Bash

1997-09-05 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-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-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 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 >char

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 Jens B. Jorgensen
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 should have RTFMpage, but here's the excerpt you

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 wh

Re: Prompt in Bash

1997-09-05 Thread Gonzalo A. Diethelm
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... On Aug 22, 1997, at 22:44, Dave Cinege wrote: > On Fri, 22 Aug 1997 12:32:35 -0300 (EST), Daniel

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 promp