Package: tinycdb
Version: 0.77
Severity: normal

Steps to reproduce:

 1. Create a database for testing purposes:

    $ printf "+1,1:a->b\n\n" | cdb -c /tmp/test.cdb

 2. Querying for a key that exists returns the value, as expected:

    $ cdb -q -m /tmp/test.cdb "a"
    b

 3. Querying for an alphabetic key that doesn't exist returns nothing,
    as expected:

    $ cdb -q -m /tmp/test.cdb "b"; echo "nothing"
    nothing

 4. However, if you query for a key that starts with "-", you get an
    error message:

    $ cdb -q -m /tmp/test.cdb "-_-"
    cdb: invalid option -- '_'
    cdb: try `cdb -h' for help

    I would have expected no output, since the key "-_-" doesn't exist
    in the database.

According to the description of "cdb -q" in the manpage, a parameter
after the database filename can only be a key to query, so it seems to
be a bug that cdb is trying to interpret it as an option.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tinycdb depends on:
ii  libc6    2.13-32
ii  libcdb1  0.77

tinycdb recommends no packages.

tinycdb suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to