From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15569 invoked from network); 13 Jul 2001 12:10:46 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Jul 2001 12:10:46 -0000 Received: (qmail 2654 invoked by alias); 13 Jul 2001 12:10:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15390 Received: (qmail 2642 invoked from network); 13 Jul 2001 12:10:39 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH Workers Mailing List" Subject: PATCH: 4.1: cygwin mount Date: Fri, 13 Jul 2001 16:10:35 +0400 Message-ID: <000201c10b94$d218cab0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0003_01C10BB6.592D77F0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006 This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C10BB6.592D77F0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit This is specialcased because cgwin mount has too little in common with normal mount. I suppose, we can't currently complete 'Windows path" (that is exactly what is expected - windows path in form x:\foo\bar\com). Should it go into 4.0? -andrej ------=_NextPart_000_0003_01C10BB6.592D77F0 Content-Type: application/octet-stream; name="zsh-mount-cygwin.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zsh-mount-cygwin.diff" Index: Completion/Unix/Command/_mount=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_mount,v=0A= retrieving revision 1.4=0A= diff -u -r1.4 _mount=0A= --- Completion/Unix/Command/_mount 2001/06/13 11:05:51 1.4=0A= +++ Completion/Unix/Command/_mount 2001/07/13 12:07:10=0A= @@ -1,5 +1,49 @@=0A= #compdef mount umount=0A= =0A= +if [[ "$OSTYPE" =3D=3D cygwin ]]; then=0A= + if [[ "$service" =3D=3D mount ]] ; then=0A= + _arguments -s \=0A= + - mount \=0A= + '(-b -t --text)--binary[Unix line endings LF]' \=0A= + '(--binary -t --text)-b[Unix line endings LF]' \=0A= + '(-f)--force[be silent]' \=0A= + '(--force)-f[be silent]' \=0A= + '(-s -u --user)--system[system-wide mount point]' \=0A= + '(--system -u --user)-s[system-wide mount point]' \=0A= + '(-t -b --binary)--text[(default) DOS line endings CR-LF]' \=0A= + '(--text -b --binary)-t[(default) DOS line endings CR-LF]' \=0A= + '(-u -s --system)--user[(default)user private mount point]' \=0A= + '(--user -s --system)-u[(default)user private mount point]' \=0A= + '(-x -X --cygwin-executable)--executable[all files under = mountpoint are executables]' \=0A= + '(--executable -X --cygwin-executable)-x[all files under = mountpoint are executables]' \=0A= + '(-X -x --executable)--cygwin-executable[all files under = mountpoint are cygwin executables]' \=0A= + '(--cygwin-executable -x --executable)-X[all files under = mountpoint are cygwin executables]' \=0A= + ':Windows path:' \=0A= + ':Unix path:_path_files -P/ -W "(/)" -/' \=0A= + - control \=0A= + '(-i -p --show-cygdrive-prefix -c = --change-cygdrive-prefix)--import-old-mounts[import old mounts]' \=0A= + '(--import-old-mounts -p --show-cygdrive-prefix -c = --change-cygdrive-prefix)-i[import old mounts]' \=0A= + '(-p -i --import-old-mounts -c = --change-cygdrive-prefix)--show-cygdrive-prefix[show cygdrive prefix]' \=0A= + '(--show-cygdrive-prefix -i --import-old-mounts -c = --change-cygdrive-prefix)-p[show cygdrive prefix]' \=0A= + '(-c -i --import-old-mounts -p = --show-cygdrive-prefix)--change-cygdrive-prefix[cygdrive = prefix]:cygdrive prefix (POSIX path):_files -P/ -W "(/)" -/' \=0A= + '(--change-cygdrive-prefix -i --import-old-mounts -p = --show-cygdrive-prefix)-c[cygdrive prefix]:cygdrive prefix (POSIX = path):_files -P/ -W "(/)" -/' =0A= + =0A= + return=0A= + else=0A= + local line=0A= + local -a wpaths upaths=0A= + mount | while read -r line; do=0A= + [[ $line =3D=3D ?:\ * ]] && continue=0A= + wpaths=3D($wpaths ${line%% on*})=0A= + upaths=3D($upaths ${${line##*on }%% type*})=0A= + done=0A= + _alternative \=0A= + 'windowspath:WIndows path:compadd -a wpaths' \=0A= + 'unixpath:Unix path:compadd -a upaths'=0A= + return=0A= + fi=0A= +fi=0A= +=0A= # This is table-driven: the tables for the values for the different=0A= # file system types are directly below. The tables describing the=0A= # arguments for the `mount' command for different operating systems=0A= ------=_NextPart_000_0003_01C10BB6.592D77F0--