* Completing UNC paths in Windows/Cygwin @ 2011-09-06 17:47 Hannu Koivisto 2011-09-07 7:45 ` Nikolai Weibull 0 siblings, 1 reply; 6+ messages in thread From: Hannu Koivisto @ 2011-09-06 17:47 UTC (permalink / raw) To: Zsh Users' List Hi, Is there a way to make zsh complete UNC paths like //machine/C\$/directory/f<complete> in Windows/Cygwin? -- Hannu ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Completing UNC paths in Windows/Cygwin 2011-09-06 17:47 Completing UNC paths in Windows/Cygwin Hannu Koivisto @ 2011-09-07 7:45 ` Nikolai Weibull 2011-09-07 9:51 ` Hannu Koivisto 0 siblings, 1 reply; 6+ messages in thread From: Nikolai Weibull @ 2011-09-07 7:45 UTC (permalink / raw) To: Hannu Koivisto; +Cc: Zsh Users' List On Tue, Sep 6, 2011 at 19:47, Hannu Koivisto <azure@iki.fi> wrote: > Is there a way to make zsh complete UNC paths like > //machine/C\$/directory/f<complete> in Windows/Cygwin? //machine/share/directory/f<complete> should work (it does on my computer at work). I don’t know about C\$-type shares, though. Perhaps such “names” confuse the completion code. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Completing UNC paths in Windows/Cygwin 2011-09-07 7:45 ` Nikolai Weibull @ 2011-09-07 9:51 ` Hannu Koivisto 2011-09-07 9:58 ` Nikolai Weibull 0 siblings, 1 reply; 6+ messages in thread From: Hannu Koivisto @ 2011-09-07 9:51 UTC (permalink / raw) To: Nikolai Weibull; +Cc: Zsh Users' List Nikolai Weibull <now@bitwi.se> writes: > On Tue, Sep 6, 2011 at 19:47, Hannu Koivisto <azure@iki.fi> wrote: > >> Is there a way to make zsh complete UNC paths like >> //machine/C\$/directory/f<complete> in Windows/Cygwin? > > //machine/share/directory/f<complete> should work (it does on my > computer at work). I don’t know about C\$-type shares, though. > Perhaps such “names” confuse the completion code. //machine/share/directory/f<complete> doesn't work either for me. I'm using the latest (hopefully) Cygwin zsh package (ZSH_VERSION 4.3.12) and I tested without any of my usual .zshrc etc. stuff except for autoload -U compinit compinit -u -d ~/.zcompdump-$HOST -- Hannu ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Completing UNC paths in Windows/Cygwin 2011-09-07 9:51 ` Hannu Koivisto @ 2011-09-07 9:58 ` Nikolai Weibull 2011-09-07 15:54 ` Hannu Koivisto 0 siblings, 1 reply; 6+ messages in thread From: Nikolai Weibull @ 2011-09-07 9:58 UTC (permalink / raw) To: Hannu Koivisto; +Cc: Zsh Users' List 2011/9/7 Hannu Koivisto <azure@iki.fi>: > Nikolai Weibull <now@bitwi.se> writes: > >> On Tue, Sep 6, 2011 at 19:47, Hannu Koivisto <azure@iki.fi> wrote: >> >>> Is there a way to make zsh complete UNC paths like >>> //machine/C\$/directory/f<complete> in Windows/Cygwin? >> >> //machine/share/directory/f<complete> should work (it does on my >> computer at work). I don’t know about C\$-type shares, though. >> Perhaps such “names” confuse the completion code. > > //machine/share/directory/f<complete> doesn't work either for me. Try setting the accept-exact-dirs zstyle and see if that helps. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Completing UNC paths in Windows/Cygwin 2011-09-07 9:58 ` Nikolai Weibull @ 2011-09-07 15:54 ` Hannu Koivisto 2011-09-07 16:02 ` Peter Stephenson 0 siblings, 1 reply; 6+ messages in thread From: Hannu Koivisto @ 2011-09-07 15:54 UTC (permalink / raw) To: Nikolai Weibull; +Cc: Zsh Users' List Nikolai Weibull <now@bitwi.se> writes: > 2011/9/7 Hannu Koivisto <azure@iki.fi>: >> //machine/share/directory/f<complete> doesn't work either for me. > > Try setting the accept-exact-dirs zstyle and see if that helps. It does indeed fix //machine/share/directory/f<complete> and //machine/C\$/directory/f<complete> but //machine/C\$/<tab> just causes the shell to get stuck forever (Ctrl-C helps), just like //machine/<tab> (I guess that one is not surprising as it would probably require some special code for listing shares). I have also observed that Program\ Files\ \(x86\)/<tab> fails if accept-exact style is true. Without the parentheses it doesn't fail. It turns out that setting accept-exact-dirs to true in addition to accept-exact fixes that case. Admittedly I don't really understand accept-exact, even after reading the documentation. For some reason I no longer remember I have copy&pasted it to my .zshrc's Windows/Cygwin specific section in addition to zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' (which I believe I understand). Am I supposed to set accept-exact-dirs to true if accept-exact is true? Is there something that zsh could do so that users wouldn't have to set accept-exact-dirs in order to have //machine/foo/bar/<tab> work? -- Hannu ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Completing UNC paths in Windows/Cygwin 2011-09-07 15:54 ` Hannu Koivisto @ 2011-09-07 16:02 ` Peter Stephenson 0 siblings, 0 replies; 6+ messages in thread From: Peter Stephenson @ 2011-09-07 16:02 UTC (permalink / raw) To: Zsh Users' List On Wed, 7 Sep 2011 18:54:42 +0300 Hannu Koivisto <azure@iki.fi> wrote: > Am I supposed to set accept-exact-dirs to true if accept-exact is > true? They do different things, they just happen to be similar enough that the name is similar. > Is there something that zsh could do so that users wouldn't > have to set accept-exact-dirs in order to have > //machine/foo/bar/<tab> work? Not, presumably, without more hacking around with a part of the completion code that breaks something every single time it gets changed. It would be nice to be able to specify plugins to handle appropriate file contexts, but that's not going to happen until somebody understands _path_files, and at the moment we're all struggling quite badly. -- Peter Stephenson <pws@csr.com> Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-08 1:37 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-06 17:47 Completing UNC paths in Windows/Cygwin Hannu Koivisto 2011-09-07 7:45 ` Nikolai Weibull 2011-09-07 9:51 ` Hannu Koivisto 2011-09-07 9:58 ` Nikolai Weibull 2011-09-07 15:54 ` Hannu Koivisto 2011-09-07 16:02 ` Peter Stephenson
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).