Date: Mon, 22 Sep 2014 18:54:34 -0400 From: Dutch Ingraham <stoa@gmx.us> To: freebsd-questions@freebsd.org Subject: Re: .bashrc guru needed Message-ID: <5420A8AA.8050601@gmx.us> In-Reply-To: <e3a6a1a24c1c0af8e75577d8ecf1a8ea@surewest.net> References: <e3a6a1a24c1c0af8e75577d8ecf1a8ea@surewest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5420A8AA.8050601>
