zsh-users
 help / color / mirror / code / Atom feed
* zstyle for function instead of command?
@ 2008-11-22  0:14 sam reckoner
  2008-11-22  4:11 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: sam reckoner @ 2008-11-22  0:14 UTC (permalink / raw)
  To: zsh-users

I have defined the following function:

v () {
        '/cygdrive/c/Vim/vim71/gvim.exe' $* &
}

I can do

% zstyle ':completion:*:*:gvim:*:*' file-patterns '*.py' '*.*'

and get gvim to complete first on *.py files, but it doesn't work with
the function. In other words,

% v <TAB>
Does not restrict completions to *.py files, even if they are there.

I have tried doing
% zstyle ':completion:*:*:v:*:*' file-patterns '*.py' '*.*'

but that doesn't work either.

Little help?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zstyle for function instead of command?
  2008-11-22  0:14 zstyle for function instead of command? sam reckoner
@ 2008-11-22  4:11 ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2008-11-22  4:11 UTC (permalink / raw)
  To: zsh-users

On Nov 21,  4:14pm, sam reckoner wrote:
}
} v () {
}         '/cygdrive/c/Vim/vim71/gvim.exe' $* &
} }
} 
} I have tried doing
} % zstyle ':completion:*:*:v:*:*' file-patterns '*.py' '*.*'
} 
} but that doesn't work either.

That certainly should work, and does for me on linux.

What do you get from

% v <ctrl-x>h

and how does it differ from what you get from

% gvim <ctrl-x>h

??


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zstyle for function instead of command?
@ 2008-11-26 19:50 sam reckoner
  0 siblings, 0 replies; 5+ messages in thread
From: sam reckoner @ 2008-11-26 19:50 UTC (permalink / raw)
  To: zsh-users

For the record, it turns out I had

compctl -g '*(^/)' + v

in my legacy .zshrc file which was screwing things up. Once I removed
that everything worked normally.

Thanks again for your help debugging this.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zstyle for function instead of command?
  2008-11-23  2:02 sam reckoner
@ 2008-11-23 19:09 ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2008-11-23 19:09 UTC (permalink / raw)
  To: zsh-users

On Nov 22,  6:02pm, sam reckoner wrote:
} 
} % gvim ^Xh
} 
} tags in context :completion::complete:gvim::
}     argument-rest options  (_arguments _vim)
} tags in context :completion::complete:gvim:argument-rest:
}     all-files  (_files _vim_files _arguments _vim)
} 
} But when I try the same w/
} 
} % v ^Xh
} 
} I get nothing.

That's extremely suspicious.  You should get some kind of output for
anything, e.g., the default fallback for completion should produce

tags in context :completion::complete:v::
    globbed-files  (_files _default (eval))

What do you get if the word in command position is an entirely non-
existent command, that is, neither a .exe nor a function nor an alias?
Does it matter whether that word is a single character long, or longer?

Do you have autocd set and is there a directory named "v" somewhere
in your cdpath?  I'm sort of grabbing straws here.  You don't have a
v: drive, do you?

} did I find a bug? I am using cygwin on winXP

Unfortunately I don't have a cygwin environment in which to fool with
this, and as 4.3.9 is out now it might be better if you can reproduce
the problem with that rather than 4.3.4.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zstyle for function instead of command?
@ 2008-11-23  2:02 sam reckoner
  2008-11-23 19:09 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: sam reckoner @ 2008-11-23  2:02 UTC (permalink / raw)
  To: zsh-users

When I do

% gvim ^Xh

I get

tags in context :completion::complete:gvim::
    argument-rest options  (_arguments _vim)
tags in context :completion::complete:gvim:argument-rest:
    all-files  (_files _vim_files _arguments _vim)


But when I try the same w/

% v ^Xh

I get nothing.

did I find a bug? I am using cygwin on winXP

% zsh --version
zsh 4.3.4 (i686-pc-cygwin)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-26 19:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-22  0:14 zstyle for function instead of command? sam reckoner
2008-11-22  4:11 ` Bart Schaefer
2008-11-23  2:02 sam reckoner
2008-11-23 19:09 ` Bart Schaefer
2008-11-26 19:50 sam reckoner

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).