zsh-users
 help / color / mirror / code / Atom feed
* No path completion on Cygwin mounts?
@ 2003-07-24 19:45 Jason Tiller
  2003-07-25 15:28 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Tiller @ 2003-07-24 19:45 UTC (permalink / raw)
  To: zsh-users

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


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

* Re: No path completion on Cygwin mounts?
  2003-07-24 19:45 No path completion on Cygwin mounts? Jason Tiller
@ 2003-07-25 15:28 ` Peter Stephenson
  2003-07-25 20:43   ` Jason Tiller
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2003-07-25 15:28 UTC (permalink / raw)
  To: Jason Tiller; +Cc: zsh-users

Jason Tiller wrote:
> However, I'm having trouble getting pathname completion to work on
> Cygwin mounts.

I'm afraid I haven't been able to get it to fail (I'm using 4.1.1).
None of your settings look weird.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

* Re: No path completion on Cygwin mounts?
  2003-07-25 15:28 ` Peter Stephenson
@ 2003-07-25 20:43   ` Jason Tiller
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Tiller @ 2003-07-25 20:43 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

Hi, Peter, :)

On Fri, 25 Jul 2003, Peter Stephenson wrote:
> Jason Tiller wrote:

> > However, I'm having trouble getting pathname completion to work on
> > Cygwin mounts.

> I'm afraid I haven't been able to get it to fail (I'm using 4.1.1).
> None of your settings look weird.

Well, I did a little work myself and discovered pretty rapidly that
the issue is the 'compinit' call in my zshenv.  I began walking
through my startup file and when I started a shell that didn't make
the call to 'compinit', then my completion worked fine (once I
realized it was case-sensitive!).

However, with a little more investigation, it seems that my call to
'zstyle' also affected the completion.

Here are the lines from zshenv in question:

<snip>
# 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}'
</snip>

If I just comment-out the 'compinit' line and the 'zstyle' line, then
completion works as I would expect, regardless of the mount.

Any idea what might be happening here?  BTW, this is Zsh 4.0.6
compiled for Cygwin, in case it wasn't obvious.

Thanks!

---Jason


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

end of thread, other threads:[~2003-07-25 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24 19:45 No path completion on Cygwin mounts? Jason Tiller
2003-07-25 15:28 ` Peter Stephenson
2003-07-25 20:43   ` Jason Tiller

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