zsh-users
 help / color / mirror / code / Atom feed
From: Jason Tiller <jtiller@sjm.com>
To: zsh-users@sunsite.dk
Subject: No path completion on Cygwin mounts?
Date: Thu, 24 Jul 2003 12:45:46 -0700 (Pacific Daylight Time)	[thread overview]
Message-ID: <Pine.WNT.4.56.0307241245030.2412@WS-USSV-50569-L.ad.sjm.com> (raw)

Hi, All, :)

My recent upgrade to a decent computer has made it feasible to try Zsh
again.  As I'm using Cygwin for my *nix environment, everything is
*much* slower than on a true *nix box, so my old PIII-700 laptop just
couldn't cut it.  The new 2.0GHz P4M laptop runs Zsh (with some
bells/whistles) reasonably well.

However, I'm having trouble getting pathname completion to work on
Cygwin mounts.  Here's my Cygwin mount table:

<snip>
64 12:27 ~
$ mount
C:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system (binmode)
C:\cygwin\bin on /usr/bin type user (binmode)
C:\cygwin\lib on /usr/lib type user (binmode)
C:\cygwin on / type user (binmode)
c: on /c type system (textmode)
h: on /h type system (binmode,noexec)
o: on /o type system (binmode,noexec)
q: on /q type system (binmode,noexec)
t: on /t type system (binmode,noexec)
v: on /v type system (binmode,noexec)
d: on /cygdrive/d type user (binmode,noumount)
m: on /cygdrive/m type user (binmode,noumount)
n: on /cygdrive/n type user (binmode,noumount)
p: on /cygdrive/p type user (binmode,noumount)
r: on /cygdrive/r type user (binmode,noumount)
w: on /cygdrive/w type user (binmode,noumount)
x: on /cygdrive/x type user (binmode,noumount)
y: on /cygdrive/y type user (binmode,noumount)
z: on /cygdrive/z type user (binmode,noumount)
</snip>

The problem comes when I try to complete a path on the mount point and
my CWD is on another mount.  For example:

<snip>
67 12:32 /h
$ pwd
/h

68 12:35 /h
$ cd /c/te<tab>
</snip>

Given my completion options, the <tab> *should* have completed to
'/c/temp/', because the C:\temp directory definitely exists.

The strange thing is that when I actually cd to the mount (so my CWD
is on the mount), then completion works fine.  This works as expected:

<snip>
72 12:37 /h
$ cd /c

73 12:37 /c
$ cd te<tab>

73 12:37 /c
$ cd temp

74 12:37 /c/temp
$
</snip>

(I mangled the screen capture a little bit on #73 to show the process
of <tab> completion.)

Does this make sense to anyone?  Any ideas why this might be
happening?

The only configuration settings I have are in /etc/zshenv, and here it
is:

<snip>
76 12:39 /etc
$ cat zshenv
# Called very first in the zsh startup process.

echo "This is /etc/zshenv"

export PS1='
%! %T %B%~%b
$ '

# Hack up the path.
export PATH="$(/usr/bin/perl ~/perl/fixpath3.pl)"

# Configure the zsh completion system.
autoload -U compinit
compinit

# Set some of my options.
setopt CDABLE_VARS
setopt AUTO_CD  # Like 4DOS 'cd' without 'cd'! - *yes*!!
setopt EXTENDED_GLOB  # Cool stuff.

# Make completion and file stuff insensitive.  Wow, I have no idea how
# this works.
zstyle ":completion:*" matcher-list 'm:{A-Za-z}={a-zA-Z}'

# Map backspace to 'erase' (backspace).
[[ "$TERM" == "xterm" || "$TERM" == "rxvt" ]] && stty erase '^?'

# Modify 'less' to be:
# -i: case insensitive unless search is for mixed case
# -F: Quit if less than one screen full.
# -M: use a prompt that has more detail about the file
# -X: don't reset the terminal before and after running.  This will
#     keep the last data displayed by less on the screen after quitting.
# -S: chop long lines so they don't wrap incessantly
# # 8: Change the horizontal scroll increment to be 8 columns
#alias less='less -iFMSX# 8'
export LESS="-iFMSX# 8"

# Called by zsh when the CWD is changed.  OLDPWD is the directory
# we're leaving.
chpwd() {
   if [[ ( $OLDPWD == /? ) || ( $OLDPWD == /?/* ) ]] then
      # Take the 2nd character
      drive=$OLDPWD[2]
      eval "p$drive=\"$OLDPWD\"";
   fi
}
</snip>

Thanks a lot for any help!

---Jason
St. Jude Medical


             reply	other threads:[~2003-07-24 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-24 19:45 Jason Tiller [this message]
2003-07-25 15:28 ` Peter Stephenson
2003-07-25 20:43   ` Jason Tiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.WNT.4.56.0307241245030.2412@WS-USSV-50569-L.ad.sjm.com \
    --to=jtiller@sjm.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).