Grub and GLib both install bash completion scripts. Need to add 
something to the default /etc/profile in the book to take advantage of them.

Additionally, the one for grub is broken currently looking for a have() 
function, which for distros is usually defined in /etc/bash_completion. 
So, I'd suggest to add a /etc/bash_completion file with the following 
commands:

cat > /etc/bash_completion << "EOF" &&
#!/bin/bash
# Begin /etc/bash_completion

have()
{
   unset -v have
   PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
   have="yes"
}

# Pull in additional completion scripts
for script in /etc/bash_completion.d/* ; do
     if [ -r "${script}" ] ; then
         . "${script}"
     fi
done
unset script

# End /etc/bash_completion

EOF
chmod 644 /etc/bash_completion

And then source the /etc/bash_completion file from the default /etc/profile.

Also, what of /etc/profile.d/ for LFS? Best continued to be left for 
BLFS? I would consider it nice to have in a default installation, but 
there is nothing that uses it until the 4th package into BLFS for me.

-- DJ Lucas

-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

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

Reply via email to