Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#497663: Tab completion for vim is broken

0 views
Skip to first unread message

Arto Jantunen

unread,
Sep 3, 2008, 9:20:13 AM9/3/08
to
Package: zsh
Version: 4.3.6-7
Severity: normal

Typing vim and pressing tab produces the following output:

_vim:31: unmatched '

Commenting out lines 31-40 in
/usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should
be trivial to fix properly for someone who understands zsh's compeltion
syntax (I don't).


-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zsh depends on:
ii libc6 2.7-13 GNU C Library: Shared libraries
ii libcap2 2.11-2 support for getting/setting POSIX.
ii libncursesw5 5.6+20080830-1 shared libraries for terminal hand

Versions of packages zsh recommends:
ii libpcre3 7.6-2.1 Perl 5 Compatible Regular Expressi

Versions of packages zsh suggests:
pn zsh-doc <none> (no description available)

-- debconf information excluded

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

Clint Adams

unread,
Sep 3, 2008, 3:20:06 PM9/3/08
to
On Wed, Sep 03, 2008 at 04:04:32PM +0300, Arto Jantunen wrote:
> Typing vim and pressing tab produces the following output:
>
> _vim:31: unmatched '
>
> Commenting out lines 31-40 in
> /usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should
> be trivial to fix properly for someone who understands zsh's compeltion
> syntax (I don't).

I can't reproduce this and I don't see what the problem might be.
Is this consistent for you?

Arto Jantunen

unread,
Sep 4, 2008, 5:10:12 AM9/4/08
to
Clint Adams <sch...@debian.org> writes:

> On Wed, Sep 03, 2008 at 04:04:32PM +0300, Arto Jantunen wrote:
>> Typing vim and pressing tab produces the following output:
>>
>> _vim:31: unmatched '
>>
>> Commenting out lines 31-40 in
>> /usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should
>> be trivial to fix properly for someone who understands zsh's compeltion
>> syntax (I don't).
>
> I can't reproduce this and I don't see what the problem might be.
> Is this consistent for you?

Hmm. Apparently it depends on "emulate csh" being used. I can't
reproduce with a .zshrc of only

autoload -U compinit
compinit

But can after adding emulate csh above those lines.

--
Arto Jantunen

Clint Adams

unread,
Sep 4, 2008, 6:10:08 AM9/4/08
to
On Thu, Sep 04, 2008 at 12:05:05PM +0300, Arto Jantunen wrote:
> >> Typing vim and pressing tab produces the following output:
> >>
> >> _vim:31: unmatched '
> >>
> >> Commenting out lines 31-40 in
> >> /usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should
> >> be trivial to fix properly for someone who understands zsh's compeltion
> >> syntax (I don't).
> >
> > I can't reproduce this and I don't see what the problem might be.
> > Is this consistent for you?
>
> Hmm. Apparently it depends on "emulate csh" being used. I can't
> reproduce with a .zshrc of only
>
> autoload -U compinit
> compinit
>
> But can after adding emulate csh above those lines.

Anyone know which option might be the culprit here?

Frank Terbeck

unread,
Sep 4, 2008, 8:00:17 AM9/4/08
to
Clint Adams <sch...@debian.org>:

> On Thu, Sep 04, 2008 at 12:05:05PM +0300, Arto Jantunen wrote:
> > >> Typing vim and pressing tab produces the following output:
> > >>
> > >> _vim:31: unmatched '
> > >>
> > >> Commenting out lines 31-40 in
> > >> /usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should
> > >> be trivial to fix properly for someone who understands zsh's compeltion
> > >> syntax (I don't).
> > >
> > > I can't reproduce this and I don't see what the problem might be.
> > > Is this consistent for you?
> >
> > Hmm. Apparently it depends on "emulate csh" being used. I can't
> > reproduce with a .zshrc of only
> >
> > autoload -U compinit
> > compinit
> >
> > But can after adding emulate csh above those lines.
>
> Anyone know which option might be the culprit here?

Yes, 'csh_junkie_quotes'.

The problem will vanish, if you unset that option after your 'emulate
csh' call.

However, I thought 'setopt no_csh_junkie_quotes' or 'emulate -L' at
the start of the file would be enough. But apparently it isn't...

Regards, Frank

--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925

Peter Stephenson

unread,
Sep 4, 2008, 8:50:12 AM9/4/08
to
Clint Adams wrote:
> On Thu, Sep 04, 2008 at 12:05:05PM +0300, Arto Jantunen wrote:
> > >> Typing vim and pressing tab produces the following output:
> > >>
> > >> _vim:31: unmatched '
> > >>
> > >> Commenting out lines 31-40 in
> > >> /usr/share/zsh/functions/Completion/Unix/_vim fixes the problem. Should
> > >> be trivial to fix properly for someone who understands zsh's compeltion
> > >> syntax (I don't).
> > >
> > > I can't reproduce this and I don't see what the problem might be.
> > > Is this consistent for you?
> >
> > Hmm. Apparently it depends on "emulate csh" being used. I can't
> > reproduce with a .zshrc of only
> >
> > autoload -U compinit
> > compinit
> >
> > But can after adding emulate csh above those lines.
>
> Anyone know which option might be the culprit here?

csh_junkie_quotes

--- ../zsh-debug/zsh/Completion/compinit 2008-06-06 17:43:35.000000000 +0100
+++ Completion/compinit 2008-09-04 13:34:21.000000000 +0100
@@ -139,6 +139,7 @@
NO_allexport
NO_aliases
NO_cshnullglob
+ NO_cshjunkiequotes
NO_errexit
NO_globsubst
NO_histsubstpattern


--
Peter Stephenson <p...@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070

Bart Schaefer

unread,
Sep 4, 2008, 10:40:10 AM9/4/08
to
On Sep 4, 10:03am, Clint Adams wrote:
} Subject: Re: Bug#497663: Tab completion for vim is broken

}
} On Thu, Sep 04, 2008 at 12:05:05PM +0300, Arto Jantunen wrote:
} > >> Typing vim and pressing tab produces the following output:
} > >>
} > >> _vim:31: unmatched '
} >
} > Hmm. Apparently it depends on "emulate csh" being used.
}
} Anyone know which option might be the culprit here?

Line 31 of _vim is a single-quoted string that spans multiple lines.

So CSH_JUNKIE_QUOTES is almost certainly at fault.

Clint Adams

unread,
Sep 19, 2008, 11:10:11 AM9/19/08
to
On Thu, Sep 04, 2008 at 12:05:05PM +0300, Arto Jantunen wrote:
> Hmm. Apparently it depends on "emulate csh" being used. I can't
> reproduce with a .zshrc of only
>
> autoload -U compinit
> compinit
>
> But can after adding emulate csh above those lines.

For the record, the upstream fix to compinit will be applied
if the next upload occurs before a new upstream version.

I don't intend to do this prior to the lenny release unless there are
other issues, however.

0 new messages