Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Can not complete automounted directories

On Jan 6,  1:52pm, Vin Shelton wrote:
} "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> writes:
} > How did you configure the automounter to put this "nicer path on the
} > front end"?
} Here is the contents of /etc/amd.conf:

Hm, OK.  I was mostly interested in whether /net/<hostname> was a symlink
into the /.automount directory.  That sort of thing used to be common
with the old SunOS automounter.

} I don't think I made any configuration changes from the Mandrake
} default package of am-utils-6.0.6-3mdk.

Indeed, I don't see anything obvious that would cause a problem.

} What automounter do you use, Bart?

I tested completion using RedHat autofs-3.1.4-4.

The way new completion handles the automounter is with some code in
_path_files that attempts to access the directory before completing
the files in it; the snippet looks like

    : ${^tmp1}/${PREFIX}${SUFFIX}/.(N/)

E.g. when completing after /net/mithril/opt/b that line will first glob
/net/mithril/opt/.(N/) before the subsequent code tries to find matches
for b*.   However, that code is in a loop -- it actually does, in turn,

    : //net/.(N/)

    : /net/mithril/.(N/)

    : /net/mithril/opt/.(N/)

If for some reason that's not sufficient to automount the filesystem,
the completion will fail.

I suggest you have a look at the debugging output you can generate with:

    zsh% ls /net/mithril/opt/b<C-x ?>

(where <C-x ?> of course means to type ctrl-x and then question mark).

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

Messages sorted by: Reverse Date, Date, Thread, Author