.bashrc guru needed

Dutch Ingraham stoa at gmx.us
Mon Sep 22 22:52:47 UTC 2014

On 09/22/2014 02:24 PM, leeoliveshackelford at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at 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,

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


More information about the freebsd-questions mailing list