From owner-freebsd-questions Mon Aug 3 05:55:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA19995 for freebsd-questions-outgoing; Mon, 3 Aug 1998 05:55:44 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from horton.iaces.com (horton.iaces.com [204.147.87.98]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA19986 for ; Mon, 3 Aug 1998 05:55:33 -0700 (PDT) (envelope-from proot@horton.iaces.com) Received: (from proot@localhost) by horton.iaces.com (8.8.8/8.8.7) id HAA21127; Mon, 3 Aug 1998 07:54:31 -0500 (CDT) From: "Paul T. Root" Message-Id: <199808031254.HAA21127@horton.iaces.com> Subject: Re: BASH prompt question In-Reply-To: from William Woods at "Aug 2, 98 11:57:03 pm" To: wwoods@cybcon.com Date: Mon, 3 Aug 1998 07:54:31 -0500 (CDT) Cc: freebsd-questions@FreeBSD.ORG X-Organization: USWEST !nterprise Networking - ACES X-Phone: (612) 664-3385 X-Fax: (612) 664-4779 X-Page: (800) SKY-PAGE PIN: 537-7270 X-Address: 600 Stinson Blvd, Fl 1S X-Address: Minneapolis, MN 55413 X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In a previous message, William Woods said: > I would like to make my bash prompt show a little more info, like what dir the > user is in. How would I do this? from man bash: \t the current time in HH:MM:SS format \d the date in "Weekday Month Date" format (e.g., "Tue May 26") \n newline \s the name of the shell, the basename of $0 (the portion following the final slash) \w the current working directory \W the basename of the current working direc- tory \u the username of the current user \h the hostname \# the command number of this command \! the history number of this command \$ if the effective UID is 0, a #, otherwise a $ \nnn the character corresponding to the octal number nnn \\ a backslash \[ begin a sequence of non-printing characters, which could be used to embed a terminal con- trol sequence into the prompt \] end a sequence of non-printing characters -- The best cure for insomnia is to get a lot of sleep. -- W. C. Fields To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message