Re: Gnome-Terminal : smallf feature request



On Fri, Jul 16, 1999 at 09:07:40PM +0100, James Green wrote:

<snip>

> > function setpromptstring {
> >     case $TERM in
> >         xterm*)
> >             local TITLEBAR="\[\e]0;\u@\h \w\007\]"
> >             ;;
> >         *)
> >             local TITLEBAR=""
> >             ;;
> >     esac
> >     PS1="${TITLEBAR}[\u@\h \W]\$ "
> > }
> > setpromptstring
> > 
> > It's a bit more complicated than what James suggests, but it has a few
> > advantages.  First, it's not as compact, so you can see the individual
> > pieces working.  Second, it uses the entire path for the window caption,
> > but a shortened path for the prompt string.  Third, it also works when
> > you're logged into a text-only screen, like the console, or a telnet
> > session; James' solution will trash your prompt string in those
> > situations.
> 
> I just put this in my ~/.bashrc, and it trashed my prompt and made it beep
> everytime I hit a key. I had to take it out.

  Yeah, I had to try it also, same thing, changing the '\e' to '\033' fixed
it up. James H. way also does work you just have to properly 'case' it also,
I've been using a variation of it for sometime. Kind of like the format of
the above though as it is a bit cleaner looking.

--
It takes a long time to grow an old friend.

Mike Hall <mhall@riverside.org>, ICQ: #37292579, http://www.riverside.org
System Administrator (MH993) (*nix, OS/2 certified - C, Perl, CGI hacker)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]