On 9/30/07, Bruce Dubbs <[EMAIL PROTECTED]> wrote:
> Alexander E. Patrakov wrote:
> > Hello,
> >
> > the "bash shell startup files" section can be improved:
> >
> > 1) /etc/profile tests for EUID=0 in two different ways:
> >
> > |if [ $EUID -eq 0 ] ; then
> >         pathappend /sbin:/usr/sbin
> >         unset HISTFILE
> > fi|
> >
> >
> > |if [[ $EUID == 0 ]] ; then
> >   PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
> > else
> >   PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
> > fi
> >
> > |
> >
> > Please remove the "==" construction, it is completely unneeded here,
> > "-eq" works just fine. Also, "#" can be replced with "\$", too.
>
> Although you are correct about unneeded, I think it should remain as a
> demonstration of different techniques.

For the ==, I agree. For the #, I think it makes more sense to show
that \$ expands to '#' for root.

> > 3) /etc/profile.d/readline.sh is completely unneeded - readline-5.2
> > looks in /etc/inputrc by default.
>
> But it does show how to change things if the default is not used.
> Again, a comment that it is unnecessary if using the defaults wouldn't
> hurt, but I think the example should remain.

I agree with Alexander here. See readline(3), INITIALIZATION FILE
section. Readline checks for ~/.inputrc, then falls back to
/etc/inputrc unless INPUTRC is set. I see what you mean about showing
how the variable can be used, but I think this is beyond the scope of
what most people will care about. There are tons of other environment
variables that we don't discuss, and I think most users will be
entirely happy with the readline default behavior.

In LFS, it is also suggested that `info readline' is read, and users
would be able to find this information there. What I'd like to see in
LFS instead of suggesting that the contents of /etc/inputrc can be
copied to the user's ~/.inputrc is a suggestion to use "$include
/etc/inputrc". But that's not a BLFS discussion.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to