sqlite3 completion restricted to .sqlite files

Bug #526264 reported by Erno Kuusela
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bash-completion

The following line is wrong, I think:
/etc/bash_completion:complete -f -X '!*.sqlite' sqlite3

There's no de-facto/common suffix for sqlite database files, and i haven't seen any that used the .sqlite suffix.
So the completion directive makes it harder to use sqlite from the command line.

ProblemType: Bug
Architecture: amd64
Date: Tue Feb 23 09:38:23 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: bash-completion 1:1.0-3ubuntu2
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: bash-completion
Uname: Linux 2.6.31-19-generic x86_64

Revision history for this message
Erno Kuusela (erno-iki) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

See also bug 533985, which is about general issues with whitelisting filename patterns.

Changed in bash-completion (Ubuntu):
status: New → Triaged
Revision history for this message
Rob (rmelch) wrote :

The following patch add .db files to the list of auto-completion extensions for sqlite3.

Revision history for this message
Adam Guthrie (therigu) wrote :

A couple of changes have gone in upstream to help this:

http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=ce664f47f1ac9cd0799d1151795b199bce83f44d
http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=c6697f91e32fa5c28f20d1ed5faa9451b8ebb6ce

However, perhaps my changing of the status to Fix Committed was a little overzealous, if someone would like to change it back to Triaged, please do.

Changed in bash-completion (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Adam Guthrie (therigu) wrote :
tags: added: patch-forwarded-upstream
Revision history for this message
Adam Guthrie (therigu) wrote :
tags: added: patch-accepted-upstream
removed: patch-forwarded-upstream
Revision history for this message
Thomas E Jenkins (thomas-jenkins) wrote :

According to David Paleino in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608667 on Jan 2 2011:

> This is already fixed since long in our upstream git.
> I'm planning to make a new release of bash-completion ;)
>
> Kindly,
> David

So hopefully this annoyance will finally be fixed for folks soonish.

Revision history for this message
Toby Corkindale (tjc-wintrmute) wrote :

At my place of work, we use .db as the extension, and so having bash completion not provide anything is still annoying.

I can patch the completion locally, but.. still.. if there isn't a standard extension, is it really bash-completion's job to be forcing one upon us?

Revision history for this message
Bryce Harrington (bryce) wrote :

Confirmed this patch is included in oneiric's bash-completion.

Changed in bash-completion (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Stefan Sundin (stefansundin) wrote :

The additions do not include the .db extension (as the person who replied to the upstream bug report mistakenly thought); only .sqlite, .sqlite3, .s3, .s3db. I can't think of anyone who uses the two latter ones.

Can someone try to submit a new upstream report with .db and .db3 as additions. I wouldn't mind if they removed the .s3 and .s3db extensions, as I doubt they are used.

For a quick workaround, add "complete -f -X '!*.@(db|sqlite)?(3)' sqlite3" to ~/.bash_completion.

Revision history for this message
Stefan Sundin (stefansundin) wrote :

Ok, sorry, it seems like the latest patch did indeed include .db. I only looked at the commit linked in the upstream bug report. My mistake.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.