[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-reconfigure



On Sat, Jul 29, 2006 at 08:17:00 -0600, Paul E Condon wrote:
> On Sat, Jul 29, 2006 at 01:35:58PM +0000, s. keeling wrote:
> > Paul E Condon <pecondon@mesanetworks.net>:
> > >  On Wed, Jul 26, 2006 at 10:52:05AM +0200, Brent Clark wrote:
> > > > 
> > > > You know when you install debian and debconf a screen whereby you can add 
> > > > more sources to the sources.list file etc.
> > > > 
> > > > Is there a dpkg-reconfigure option for that.
> > 
> > Try running "apt-spy"
> > 
> > > > also, apart from using dpkg -l to see what packages are installed. How 
> > > > would I know what software / packages I can use dpkg-reconfigure with.
> > > 
> > >  dpkg-reconfigure is a program for re-running part of the installation
> > >  of a package. You only use it when more direct methods are too messy.
> > > 
> > > > Is there a list somewhere or something
> > 
> > Someone recently told me you can use bash TAB completion to answer
> > this, but it doesn't work for me:
> > 
> >     dokg-reconfigure<TAB>
> > 
> > This is a good question.  I've asked it before too, and I've yet to
> > see a useful answer.
> > 
> 
> I just a user, too. So, this may not be a useful answer, but...
> 
> I can't imagine why or how this could work. dpkg-reconfigure is an
> executable program. It needs to be given the name of a package to work
> on. Tab completion might tell it to work on no package, or it might
> tell it to work on all installed packages. Neither is a useful action.
> 
> And, the details of how the bash shell processes command line type-in
> make it impossible for the shell to get to the point of actually
> invoking dpkg-reconfigure. Instead, it issues a beep, which is computer
> speak for 'huh?' .

You can get extended bash completion features if you source the file
/etc/bash_completion at terminal startup and/or login. I have it like
this in my .bashrc (this was already there but commented out):

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Then you can do things like

man ps<TAB>

and bash will complete for all commands that start with "ps" and have
manpages. It will then also know the options for many commands, e.g.

make-kpkg --i<TAB>

will give me "--initrd ", etc.

I have never done so myself, but I assume that you can set up your own
completion schemes as well.

The whole thing has one disadvantage: It leads to a slight but
noticeable delay every time bash is started. I guess that is the reason
why it is not enabled by default. (Knoppix has it activated, for
example.)

-- 
Regards,
          Florian



Reply to: