Public bug reported:

Autocompletion in bash for subomdules works by completing simple file
paths.

    $ git clone https://gerrit.googlesource.com/gerrit && cd gerrit
    $ git submodule init plugins/<TAB><TAB>
    commit-message-length-validator/ README                           
reviewnotes/                     
    helloworld/                      replication/  

In zsh the completion tries to be clever and list the submodule names
only.  But it collects too much information and tries to complete
submodule name + commit description.  So, I expect this:

    % git submodule init plugins/<TAB>
    plugins/commit-message-length-validator plugins/reviewnotes
    plugins/replication

Instead I get this:

    % git submodule init plugins/<TAB>
    plugins/commit-message-length-validator\ \(v1.0-rc1-9-g545000b\)  
plugins/reviewnotes\ \(v1.0-rc1-8-ge984300\)
    plugins/replication\ \(v1.1-rc0-13-g4c3f4c9\)   

If I use --noglobalrcs I get the bash-style simple pathname behavior:

    $ zsh --noglobalrcs
    % git submodule init plugins/<TAB>
    commit-message-length-validator/  README                            
reviewnotes/                      
    helloworld/                       replication/            

I believe this bug is new in 14.04.  I did not see it until I updated from 
13.10 to 14.04.
I tried different versions of git (going back to 1.7.6) and the bug persisted.  
I did not try different versions of zsh.

$ lsb_release -rd   
Description:    Ubuntu 14.04 LTS
Release:        14.04

$ apt-cache policy zsh  
zsh:
  Installed: 5.0.2-3ubuntu6
  Candidate: 5.0.2-3ubuntu6
  Version table:
 *** 5.0.2-3ubuntu6 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
$ apt-cache policy git
git:
  Installed: 1:1.9.1-1
  Candidate: 1:1.9.1-1
  Version table:
 *** 1:1.9.1-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: zsh (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1317154

Title:
  autocompletion for 'git submodule' commands is broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1317154/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to