zsh-workers
 help / color / mirror / code / Atom feed
* Can not complete automounted directories
@ 2001-12-29 21:20 Vin Shelton
  2002-01-06  2:38 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Vin Shelton @ 2001-12-29 21:20 UTC (permalink / raw)
  To: zsh-workers

I have network shares automounted under /net/<system>/<sharename>.
So, for example, on my workstation I have access to a filesystem
located at /net/mithril/opt.  The filesystem is actually mounted at
/.automount/mithril/root/opt - automount puts a nicer path on the
front end.

Using the new completion system, I can not complete files under
/net/<system>:

zsh -f
zion% echo $ZSH_VERSION 
4.1.0-dev-3
zion% echo $MODULE_PATH
/usr/local/zsh-2001-12-22/lib/zsh/4.1.0-dev-3
zion% ls /net/mithril/opt/b<TAB>
successfully completes to /net/mithril/opt/build, but

zion% autoload -U compinit
zion% compinit
zion% ls /net/mithril/opt/b<TAB>

just beeps.

zion% ls /.automount/mithril/root/opt/b<TAB>
completes correctly to 'build'.

I find this behavior both under 4.0.4 and zsh built from CVS sources
on 12/22.

'uname -a' reports: 
Linux zion.rcn.com 2.4.8-34.1mdk-smp-acs #2 SMP Sat Dec 1 14:47:30 EST 2001 i686 unknown

Please let me know if there's any more information needed to debug
this problem.

Thanks,
  vin


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

* Re: Can not complete automounted directories
  2001-12-29 21:20 Can not complete automounted directories Vin Shelton
@ 2002-01-06  2:38 ` Bart Schaefer
  2002-01-06 18:52   ` Vin Shelton
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2002-01-06  2:38 UTC (permalink / raw)
  To: Vin Shelton, zsh-workers

On Dec 29,  4:20pm, Vin Shelton wrote:
} Subject: Can not complete automounted directories
}
} I have network shares automounted under /net/<system>/<sharename>.
} So, for example, on my workstation I have access to a filesystem
} located at /net/mithril/opt.  The filesystem is actually mounted at
} /.automount/mithril/root/opt - automount puts a nicer path on the
} front end.

Completion on automounted filesystems works for me with 4.0.4.  There
was a patch for it way back in 3.1.9-dev-7 (October 2000).

How did you configure the automounter to put this "nicer path on the
front end"?

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


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

* Re: Can not complete automounted directories
  2002-01-06  2:38 ` Bart Schaefer
@ 2002-01-06 18:52   ` Vin Shelton
  2002-01-06 21:01     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Vin Shelton @ 2002-01-06 18:52 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

"Bart Schaefer" <schaefer@brasslantern.com> writes:

> On Dec 29,  4:20pm, Vin Shelton wrote:
> } Subject: Can not complete automounted directories
> }
> } I have network shares automounted under /net/<system>/<sharename>.
> } So, for example, on my workstation I have access to a filesystem
> } located at /net/mithril/opt.  The filesystem is actually mounted at
> } /.automount/mithril/root/opt - automount puts a nicer path on the
> } front end.
> 
> Completion on automounted filesystems works for me with 4.0.4.  There
> was a patch for it way back in 3.1.9-dev-7 (October 2000).
> 
> How did you configure the automounter to put this "nicer path on the
> front end"?


Here is the contents of /etc/amd.conf:

#
# amd default config file
#
# check amd.conf(5) man page for details about options in this file
#

# GLOBAL OPTIONS SECTION
[ global ]
normalize_hostnames =   no
print_pid =             yes
pid_file =              /var/run/amd.pid
restart_mounts =        yes
auto_dir =              /.automount
#log_file =             /var/log/amd
log_file =              syslog
log_options =           all
#debug_options =        all
plock =                 no
selectors_on_default =  yes
print_version =         no
# set map_type to "nis" for NIS maps, or comment it out to search for all
# types
map_type =              file
search_path =           /etc
browsable_dirs =        yes
show_statfs_entries =   no
fully_qualified_hosts = no
cache_duration =        300

# DEFINE AN AMD MOUNT POINT
[ /net ]
map_name =              amd.net
map_type =              file


And here is the contents of /etc/amd.net:

/defaults fs:=${autodir}/${rhost}/root/${rfs};opts:=nosuid,nodev,rsize=8192,wsize=8192
*       rhost:=${key};type:=host;rfs:=/


I don't think I made any configuration changes from the Mandrake
default package of am-utils-6.0.6-3mdk.  What automounter do you use,
Bart?

  - vin


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

* Re: Can not complete automounted directories
  2002-01-06 18:52   ` Vin Shelton
@ 2002-01-06 21:01     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2002-01-06 21:01 UTC (permalink / raw)
  To: Vin Shelton; +Cc: zsh-workers

On Jan 6,  1:52pm, Vin Shelton wrote:
}
} "Bart Schaefer" <schaefer@brasslantern.com> 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   


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

end of thread, other threads:[~2002-01-06 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-29 21:20 Can not complete automounted directories Vin Shelton
2002-01-06  2:38 ` Bart Schaefer
2002-01-06 18:52   ` Vin Shelton
2002-01-06 21:01     ` 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).