From owner-freebsd-questions Tue Dec 8 05:54:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA27372 for freebsd-questions-outgoing; Tue, 8 Dec 1998 05:54:10 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail2.panix.com (mail2.panix.com [166.84.0.213]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA27361 for ; Tue, 8 Dec 1998 05:54:08 -0800 (PST) (envelope-from tomg@nrnet.org) Received: from mailhost.nrnet.org (root@mailhost.nrnet.org [166.84.192.39]) by mail2.panix.com (8.8.8/8.8.8/PanixM1.3) with ESMTP id IAA23274; Tue, 8 Dec 1998 08:54:02 -0500 (EST) Received: from localhost (tomg@localhost) by mailhost.nrnet.org (8.8.7/8.8.4) with SMTP id IAA06974; Tue, 8 Dec 1998 08:33:52 -0500 Date: Tue, 8 Dec 1998 08:33:52 -0500 (EST) From: Thomas Good To: Markus cc: "FreeBSD-questions@FreeBSD.ORG" Subject: Re: prompt2 In-Reply-To: <19981208151654.S12688@freebie.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 8 Dec 1998, Greg Lehey wrote: > On Monday, 7 December 1998 at 20:41:44 +0000, Markus wrote: > > Hi, > > > > I've searched hi and low but cannot find any info regarding the prompt > > shell variable. I've been attempting to set my prompt as the current > > working directory such as: > > > > /usr/home/marke>% > > > > and have it change when the directory is changed. I was going to do an > > alias for cd and maybe change the prompt variable or use the second > > prompt variable if I knew how to print it as well but couldn't find the > > cd executable, I believe it's a system call???, > > No, it's not a system call. > > > and couldn't find info on prompt2. Do you know how to do this?? > > It depends on your shell, which you haven't mentioned. Take a look at > the man page for your shell. Hi Markus, I like a slackware style prompt so I borrowed Patrick's syntax from /etc/profile and stuck it in my .profile. This works for bash...for other logins that invoke bash as a subshell I put it in my .bashrc. PS1='`hostname -s`:`pwd`$ ' Looks like you need simply: PS1='`pwd`>%' or something similar. For the ksh, I use: PS1='my_box:$PWD$ ' where my_box is the output from hostname... --- BTW, I notice a striking similarity between the FreeBSD and Slackware setup programs (both written in dialog for starters)... ;-) Cheers, Tom ----------- Sisters of Charity Medical Center ---------- Department of Psychiatry ---- Thomas Good, System Administrator North Richmond CMHC/Residential Services Phone: 718-354-5528 75 Vanderbilt Ave, Quarters 8 Fax: 718-354-5056 Staten Island, NY 10304 www.panix.com/~ugd ---- Powered by PostgreSQL 6.3.2 / Perl 5.004 / DBI-0.91::DBD-PG-0.69 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message