Date: Wed, 19 Nov 97 13:56:10 -0800 From: "Studded" <Studded@dal.net> To: "FreeBSD Questions" <FreeBSD-Questions@freebsd.org> Subject: Re: Keeping mutliple machine and telnets straight.... Message-ID: <199711192156.NAA29691@mail.san.rr.com>
next in thread | raw e-mail | index | archive | help
On Wed, 19 Nov 1997 08:40:40 -0600, Dave Glowacki wrote: >> Ok, it at depends what your PS1 variable is set to.. In bash type in >> "set|more" and take note of the PS1 variable.. Or just do set | grep PS1 >Or more bash-ily: > > export PS1='\u@\h% ' > >You can even do: > > export PS1='\d \t (\s \v) \u@\h:\w % ' > >To get a prompt like: > > Wed Nov 19 14:33:10 (bash 2.00) dglo@sweetpea:/tmp % The % at the end of the prompt is generally associated with *csh. A more Bash-like thing would be to use the $ that is traditional for Bourne (plain sh) and Bash shells. And while we're comparing prompts.. :) I like to know what directory I'm in, but it can get too long to read the commands that I'm typing in, so I put the directory and such on one line, and my prompt right below. If you do this with an xterm, make sure you use the -rw argument, otherwise it won't wrap properly. [studded@dalnet /usr/local/lib/ircd/conf] 7$ set | grep PS1 PS1='[\u@\h \w]\n \#\$ ' By using the \$ shell special character, it will change to a # when I su to root. There is more info available in the bash man page, in the PROMPTING section. Hope this helps, Doug *** Proud operator, designer and maintainer of the world's largest *** Internet Relay Chat server. 4,168 clients and still growing. :-) *** Try spider.dal.net on ports 6662-4 (Powered by FreeBSD) *** Part of the DALnet IRC network ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711192156.NAA29691>