[Bash-completion-devel] Bug#366899: bash completion acts weird on dpkg-source

David Paleino d.paleino at gmail.com
Fri May 16 20:51:15 UTC 2008


tags 366899 wontfix confirmed
thanks

Hi Jonas, hi Frank,

On Fri, 12 May 2006 01:11:18 +0200, Jonas Meyer wrote:

> if i type for example dpkg-source -i /u 
> and press tab it changes it to:
> dpkg-source -i -
> and on the next tab this:
> -b   -c   -D   -E   -F   -i   -I   -l   -sa  -sA  -sk  -sK  -sn  -sp  -sP
> -sr  -sR  -ss  -su  -sU  -T   -U   -V   -W   -x
> dpkg-source -x /u 
> completes to /usr but then adds an extra space.

On Fri, 02 Mar 2007 18:04:20 +0100, Frank Küster wrote:

> Jonas Meyer <quitte at quitte.homeunix.org> wrote:
> 
> > if i type for example dpkg-source -i /u 
> > and press tab it changes it to:
> > dpkg-source -i -
> > and on the next tab this:
> > -b   -c   -D   -E   -F   -i   -I   -l   -sa  -sA  -sk  -sK  -sn  -sp  -sP
> > -sr  -sR  -ss  -su  -sU  -T   -U   -V   -W   -x
> > dpkg-source -x /u 
> > completes to /usr but then adds an extra space.
> 
> That the completion cannot properly handle absolute paths is not a
> problem for me.  However, the added space is:
> 
> dpkg-source -x tru TAB gives
> 
> 'dpkg-source -x trunk '
> 
> but of course what I want is 'dpkg-source -x trunk/'

I'm tagging this bug as "wontfix" (though it exists) because both of you are
using an incorrect dpkg-source syntax.

$ dpkg-source -h
Usage: dpkg-source [<option> ...] <command>

Commands:
  -x <filename>.dsc [<output-dir>]
                           extract source package.
[..]
$

What you're trying to do is using "/usr" (or "trunk") as output directories,
while dpkg-source (and its completion), "correctly" thinks they're Debian
Source Packages (and that's why it adds a space at the end -- "trunk " and not
"trunk/"; "/usr " and not "/usr/").

What you should do is:

$ dpkg-source -x filename.dsc directory/

I'm sorry that wouldn't be completed either: for the slash to be
appended, the directory must exist, but dpkg-source complains if the output
directory is already there:

$ mkdir foo
$ dpkg -x bash-completion_<TAB>
$ dpkg-source -x bash-completion_20060301-4.dsc fo<TAB>
foo  -sn  -sp  -su  
$ dpkg-source -x bash-completion_20060301-4.dsc foo/
dpkg-source: error: unpack target exists: foo
$

Thus, not adding a slash at the end of "foo" is quite correct when the
directory does not exist. If it existed, bash-completion would've added a
slash, but, once again, it *must not exist* for dpkg-source.

Kindly,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20080516/812d8d85/attachment-0001.pgp 


More information about the Bash-completion-devel mailing list