* compinit causes strange tab completion on '<'
@ 2006-02-13 8:24 Jeff
2006-02-13 16:29 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Jeff @ 2006-02-13 8:24 UTC (permalink / raw)
To: zsh-users
in case it matters. zsh 4.2.5
kernel 2.6.15
I have discovered some odd behavior with tab completion when compinit is
loaded even with default completion set.
I like to use the'<' builtin instead of cat
a user with no .zshrc file
%pwd
/etc
% < init.d/[tab]
gives correct file listing of /etc/init.d/
%< ./init.d/[tab]
gives correct file listing of /etc/init.d/
%< /etc/init.d/[tab]
gives correct file listing of /etc/init.d/
%cat /etc/int.d/[tab]
gives correct file listing of /etc/init.d/
%autoload -U compinit;compinit
%pwd
/etc
% < init.d/[tab]
gives correct file listing of /etc/init.d/
%< ./init.d/[tab]
gives no completion
%< /etc/init.d/[tab]
gives no completion
%cat /etc/int.d/[tab]
gives correct file listing of /etc/init.d/
%cat ./init.d/[tab]
gives correct file listing of /etc/init.d/
so basically what is going wrong is that if the path I am trying to
expand with tab starts with a / , ./ or ../ then no
expansion/completion occurs.
what can I do do make completion work correctly with "<" ?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: compinit causes strange tab completion on '<'
2006-02-13 8:24 compinit causes strange tab completion on '<' Jeff
@ 2006-02-13 16:29 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2006-02-13 16:29 UTC (permalink / raw)
To: zsh-users
On Feb 13, 3:24am, Jeff wrote:
}
} %< ./init.d/[tab]
} gives no completion
} %< /etc/init.d/[tab]
} gives no completion
This is a problem with either the _redirect completer or the _set_command
utility funtion, depending on how you look at it. _redirect calls
_set_command to find the name of the command to which input is being
redirected, but in this case there is none. _set_command incorrectly
returns /etc/init.d as the command name and conseqently the completion
system tries to complete arguments for init scripts, rather than the
names of the init scripts.
I'm not immediately sure what to do about it, though.
--
Bart Schaefer
http://www.well.com/user/barts
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-13 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 8:24 compinit causes strange tab completion on '<' Jeff
2006-02-13 16:29 ` Bart Schaefer
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).