From owner-freebsd-questions@FreeBSD.ORG Mon Sep 22 22:52:47 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 788177BF for ; Mon, 22 Sep 2014 22:52:47 +0000 (UTC) Received: from mout.gmx.com (mout.gmx.com [74.208.4.201]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43F003EF for ; Mon, 22 Sep 2014 22:52:47 +0000 (UTC) Received: from [192.168.1.65] ([172.15.184.248]) by mail.gmx.com (mrgmxus001) with ESMTPSA (Nemesis) id 0McVXi-1Xnrse2I4G-00Hbgg for ; Tue, 23 Sep 2014 00:52:40 +0200 Message-ID: <5420A8AA.8050601@gmx.us> Date: Mon, 22 Sep 2014 18:54:34 -0400 From: Dutch Ingraham User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: .bashrc guru needed References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:JUYwNinNdc7kFiel639XJTX05o0emWgBlCkXS6KotGx7HvI29L4 JCal0mKsawFVwCjf50DPg9rPK/6j93Ry2muG7ROLoQoI1NDUU8wS23X+PSZaAi/UFoYy020 vx2vU6jYsbSqCzzAJ+2tGO6YZ9nZ9LWS42o21PjHr08Nj/gFJ8A2s7uM49BZ2blCLxrWryJ 3RdbLyfr3fumYaNeocQhA== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2014 22:52:47 -0000 On 09/22/2014 02:24 PM, leeoliveshackelford@surewest.net wrote: > > I added the export statements on lines 1, 2, and 3. I added the > semi-colons on line 35, and the export PROMP_COMMAND on line 36. I > inserted the "else" statement on line 23. None of these modifications > helped. What is the programmer telling or trying to tell the interpreter > to do on line 16, "local dir=${PWD/##*/}" ? What is the programmer > telling, or trying to tell the interpreter to do on line 18, > "NEW_PWD=${PWD/#$HOME/~}" ? Please, to those coming from the world of c > programming language, bash syntax seems to be a mystery. Any and all > suggestions will be appreciated. Newby Lee > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > I'm not a .bashrc guru, but here's where I turn: 1. https://wiki.archlinux.org/index.php/Color_Bash_Prompt 2. http://wiki.gentoo.org/wiki/Bash 3. For a good short introduction of prompt basics for all shells, http://www.understudy.net/custom.html 4. The "prompting" section of the bash manpage for an explanation of the arcane symbolism of the bash prompt string syntax As to the line 16 and 18 variables, I don't find them useful unless you are setting up a lot of different users. Otherwise, to me, they just add an unnecessary layer. Here's mine: PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] " export PS1 Enjoy!