zsh-users
 help / color / mirror / code / Atom feed
* Tab complete automounted directories
@ 2004-12-28 20:09 Travis Spencer
  2004-12-29 18:30 ` Thorsten Kampe
  0 siblings, 1 reply; 2+ messages in thread
From: Travis Spencer @ 2004-12-28 20:09 UTC (permalink / raw)
  To: zsh-users

I would like zsh to list possible completions available for
automounted directories in /pkgs and /stash on my school's network.  I
read through the mailing list archive, and this is what I came up
with:

compctl -Tx 's[/pkgs/] C[0,^/pkgs/*/*]' -S / -s '$(ypcat auto_pkgs | \
    awk '\''{print $NF}'\'' FS=/ | grep "[[:alpha:]]$")'
compctl -Tx 's[/stash/] C[0,^/stash/*/*]' -S/ -s '$(ypcat auto.stash | \
    awk '\''{print $NF}'\'' FS=/ | grep "[[:alpha:]]$")'

I put both of these in my .zshrc file, but doing `ls /pkgs/<TAB>'
doesn't present all possible completions (only the ones that are
already mounted).  

What am I missing?

-- 

Regards,

Travis Spencer


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

* Re: Tab complete automounted directories
  2004-12-28 20:09 Tab complete automounted directories Travis Spencer
@ 2004-12-29 18:30 ` Thorsten Kampe
  0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Kampe @ 2004-12-29 18:30 UTC (permalink / raw)
  To: zsh-users

* Travis Spencer (2004-12-28 21:09 +0100)
> I would like zsh to list possible completions available for
> automounted directories in /pkgs and /stash on my school's network.  I
> read through the mailing list archive, and this is what I came up
> with:
> 
> compctl -Tx 's[/pkgs/] C[0,^/pkgs/*/*]' -S / -s '$(ypcat auto_pkgs | \
>     awk '\''{print $NF}'\'' FS=/ | grep "[[:alpha:]]$")'
> compctl -Tx 's[/stash/] C[0,^/stash/*/*]' -S/ -s '$(ypcat auto.stash | \
>     awk '\''{print $NF}'\'' FS=/ | grep "[[:alpha:]]$")'
> 
> I put both of these in my .zshrc file, but doing `ls /pkgs/<TAB>'
> doesn't present all possible completions (only the ones that are
> already mounted).  

compctl? Aaargh.

Use the new completion system:
zstyle ':completion:*' fake-files '/:automnt


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

end of thread, other threads:[~2004-12-29 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-28 20:09 Tab complete automounted directories Travis Spencer
2004-12-29 18:30 ` Thorsten Kampe

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).