bash-completion errors and problems (e.g. not restricting completions to matching current word)

Bug #1079641 reported by Chris Schoonbee
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
easygit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Problem description
----------------------------
Using bash-completion to complete a file name where one is expected. However after pressing <Tab> after typing enough letters to identify the file uniquely, an error or warning message is injected into the output and then the file name is completed. The eg command does however seem to be executed after pressing <Enter>.

Example
------------
I have a file called `unique` which has been modified and which I wish to stage. I type the following partial command and then press Tab:
   $ eg stage un<Tab>
I get the following output:
    eg stage unbash: [: 1: unary operator expected
    ique
with the cursor blinking on the end of the second line.
If I then press <enter> the command seems to be correctly executed as evidenced by the output of eg status. However the error message is disconcerting and distracting.

Note that using the `git` command directly does not give any error. eg
   $ git stage un<Tab>
gives
   $ git stage unique

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: easygit 0.99-1
ProcVersionSignature: Ubuntu 3.2.0-33.52-generic-pae 3.2.31
Uname: Linux 3.2.0-33-generic-pae i686
ApportVersion: 2.0.1-0ubuntu15
Architecture: i386
Date: Fri Nov 16 13:07:58 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120328)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: easygit
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chris Schoonbee (cmschoonbee) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in easygit (Ubuntu):
status: New → Confirmed
Revision history for this message
Peter Cordes (peter-cordes) wrote :

Now it isn't throwing errors, but it doesn't filter the possible completions to ones that match what's already typed.

summary: - bash-completion of filename does not work 100% (unlike git) - gives ":
- 1: unary operator expected" error
+ bash-completion of filename doesn't restrict completions to matching
+ current word
summary: - bash-completion of filename doesn't restrict completions to matching
- current word
+ bash-completion errors and problems (e.g. not restricting completions to
+ matching current word)
Revision history for this message
Peter Cordes (peter-cordes) wrote :

or I can get it to give errors with
eg pull [TAB]
it bash: [: 2: unary operator expected and tacks origin onto the end of the command line.
origin

On Trusty, with git 2:2.1.3-1avh1~tru from the git PPA.

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.