Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread DJ Lucas
On 09/11/2011 12:42 AM, DJ Lucas wrote:

 I haven't found where the Debian one is developed yet.

https://alioth.debian.org/projects/bash-completion/

-- 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


Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread Bruce Dubbs
DJ Lucas wrote:
 On 09/10/2011 11:49 PM, DJ Lucas wrote:
 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.

I see where this is installed, but I don't see where it is used.

 And it gets worse: The gdbus one requires _get_cword() from a Debian 
 package called bash-completion-lib. Grub requires 2 more from the same 
 package: filelist(), _get_longopt(), and _filelist() is dependent on 
 _expand(). There was a Google code project 
 (http://code.google.com/p/bash-completion-lib/) that doesn't cover 
 _split_longopt() (following). Last release was in Feb of 2009, but I 
 haven't found where the Debian one is developed yet.

What functionality fails if these are missing?

Overall, I think this is stupid.  These are library functions.  Why are 
they in /etc instead of /lib.  DJ, I know you are just describing things.

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


Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread Andrew Benton
On Sat, 10 Sep 2011 23:49:36 -0500
DJ Lucas d...@linuxfromscratch.org wrote:

 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.
 

rm -rf /etc/bash_completion.d # works for me. Am I missing something?

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


Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread DJ Lucas
On 09/11/2011 12:04 PM, Bruce Dubbs wrote:
 DJ Lucas wrote:
 On 09/10/2011 11:49 PM, DJ Lucas wrote:
 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.
 I see where this is installed, but I don't see where it is used.

 And it gets worse: The gdbus one requires _get_cword() from a Debian
 package called bash-completion-lib. Grub requires 2 more from the same
 package: filelist(), _get_longopt(), and _filelist() is dependent on
 _expand(). There was a Google code project
 (http://code.google.com/p/bash-completion-lib/) that doesn't cover
 _split_longopt() (following). Last release was in Feb of 2009, but I
 haven't found where the Debian one is developed yet.
 What functionality fails if these are missing?
Bash tab completion for the gsettings and gdbus commands, and several 
grub-* commands. For instance, if I type 'grub-set-default tab', I get 
a listing of the available targets in my grub.cfg:

root@name64 [ /sources/bash-completion-1.3 ]# grub-set-default
Linux, with Linux 2.6.32.15
Linux, with Linux 2.6.32.15 (recovery mode)
Linux, with Linux 2.6.36-lfs-SVN-20101118
Linux, with Linux 2.6.36-lfs-SVN-20101118 (recovery mode)
Linux, with Linux 2.6.36.2-x86_64
Linux, with Linux 2.6.36.2-x86_64 (recovery mode)
Linux, with Linux 2.6.36.2-x86_64 Kernel  32bit userspace
Linux, with Linux 2.6.36.2-x86_64 Multi-lib
Linux, with Linux 2.6.36.2-x86_64 Multi-lib (recovery mode)
Linux, with Linux 2.6.36.2-x86_64-old
Linux, with Linux 3.0.2-x86_64
Linux, with Linux 3.0.2-x86_64 (recovery mode)
Linux, with Linux 3.0.4-x86_64
Linux, with Linux 3.0.4-x86_64 (recovery mode)
WindowsXP Professional (Chainloaer)
root@name64 [ /sources/bash-completion-1.3 ]# grub-set-default

 Overall, I think this is stupid.  These are library functions.  Why are
 they in /etc instead of /lib.  DJ, I know you are just describing things.

 -- Bruce
They are bash functions that are intended to make bash command 
completion easier. LFS is fine without. I'll do something in the wiki or 
in the BLFS profile page later on. It just bugs me that these were 
'standardized' to the Debian way. Do these functions exist outside of 
Debian? Anybody got a RH or Cent box handy? As far as placement, the 
logic is that they are part of a configuration file, and technically 
they are I guess. Gray area? Anyway, all OT for this list now I guess.

-- 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


Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread Nathan Coulson
 Overall, I think this is stupid.  These are library functions.  Why are
 they in /etc instead of /lib.  DJ, I know you are just describing things.

     -- Bruce
 They are bash functions that are intended to make bash command
 completion easier. LFS is fine without. I'll do something in the wiki or
 in the BLFS profile page later on. It just bugs me that these were
 'standardized' to the Debian way. Do these functions exist outside of
 Debian? Anybody got a RH or Cent box handy? As far as placement, the
 logic is that they are part of a configuration file, and technically
 they are I guess. Gray area? Anyway, all OT for this list now I guess.

 -- DJ Lucas

a BLFS page in chapter 3 would be the cleanest way to handle this,  as
we can get as detailed as we like without adding complexity to LFS.
Unfortunately, this means that existing scripts which are installed
during LFS will be broken...  and not sure if I like the idea of a
broken setup in LFS...

-- 
Nathan Coulson (conathan)
--
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread Bruce Dubbs
DJ Lucas wrote:
 On 09/11/2011 12:04 PM, Bruce Dubbs wrote:

 Overall, I think this is stupid.  These are library functions.  Why are
 they in /etc instead of /lib.  DJ, I know you are just describing things.

 They are bash functions that are intended to make bash command 
 completion easier. LFS is fine without. 

The only bash scripts in /etc have to do with initializing bash at 
login.  We are even moving the init-functions library for boot to 
/lib/lsb.   Adding library scripts for a specific application is 
different from historical Unix usage.

 What functionality fails if these are missing?
 Bash tab completion for the gsettings and gdbus commands, and several
 grub-* commands. For instance, if I type 'grub-set-default tab', I
 get a listing of the available targets in my grub.cfg:

  root@name64 [ /sources/bash-completion-1.3 ]# grub-set-default
  Linux, with Linux 2.6.32.15

On my test machine, the tab completion does not work.  When I do a 
tab, I get a list of files/directories in PWD.  But then I use
'set show-all-if-ambiguous On' in my inputrc.

I wonder what is supposed to ge going on.  Grepping for the functions in 
the grub source doesn't return anything recognizable.

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


Re: /etc/bash_completion.d/ is not configured

2011-09-11 Thread DJ Lucas
On 09/11/2011 12:24 PM, Andrew Benton wrote:
 On Sat, 10 Sep 2011 23:49:36 -0500
 DJ Lucasd...@linuxfromscratch.org  wrote:

 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.

 rm -rf /etc/bash_completion.d # works for me. Am I missing something?

 Andy
Absolutely nothing! However, I think that I'd like to see them left in 
place for those who actually would like to use them. :-)

-- 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


/etc/bash_completion.d/ is not configured

2011-09-10 Thread DJ Lucas
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