Bug 425846

Summary: zsh completion is broken for vim
Product: [Fedora] Fedora Reporter: Suchandra Thapa <s-thapa-11>
Component: zshAssignee: James Antill <james.antill>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-29 05:02:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Suchandra Thapa 2007-12-16 15:49:56 UTC
Description of problem:
Autocompletion of zsh with vim is broken. The zsh compinit system returns an
error when trying to autocomplete file or directory names for vim invocations. 
Although the bug is fairly minor, it is really annoying.

Version-Release number of selected component (if applicable):
zsh-4.3.4-4.fc8 

How reproducible:
everytime

Steps to Reproduce:
1. open zsh shell
2. run autoload -U compinit
3. run compinit
4. type  'vi a' and then hit tab to complete the filename 
5. you'll get the following error :
_arguments:439: _vim_files: function definition file not found
  
Actual results:
Get _arguments:439: _vim_files: function definition file not found

Expected results:
Should get autocompletion of file or directory instead

Additional info:
This doesn't occur if vi is specified as /bin/vi

Comment 1 James Antill 2007-12-17 13:39:14 UTC
 I can't reproduce this with "zsh -f" so my guess is that you have something in
~/.zshrc that is causing this ... try searching for zstyle?


Comment 2 Suchandra Thapa 2007-12-17 14:55:34 UTC
I also get that but when zsh -f is run, vi is set to point to /bin/vi .  If you
alias vi to /usr/bin/vim so that you can get syntax highlighting and other
features of vim-enhanced the error will reappear.  E.g.

[XXXX@test ~]\$ zsh -f   
test% autoload -U compinit
test% compinit
test% which vi
/bin/vi
test% alias vi=/usr/bin/vim
test% vi ~/.fh
_arguments:439: _vim_files: function definition file not found


Comment 3 James Antill 2007-12-17 15:22:39 UTC
 I just tried the exact above sequence and I don't see the error.
 Do you have the file: /usr/share/zsh/4.3.4/functions/_vim ?

Comment 4 Suchandra Thapa 2007-12-20 15:08:33 UTC
The problem was in the .zcompdump in my account's home directory.  After
deleting the file, the error went away.  Unfortunately, I didn't back up the
file before deleting it so I'm not sure what was going wrong in there.