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

PATCH: zftp contexts



someone wrote
> It's time to think about not putting in any changes
> affecting lots of files (even if not functionally substantial) until
> afterwards.

Humph.  I suggested to myself that it would be sensible to make contexts in
zftp consistent with others, i.e. not having a trailing colon.

Index: Doc/Zsh/zftpsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zftpsys.yo,v
retrieving revision 1.2
diff -u -r1.2 zftpsys.yo
--- Doc/Zsh/zftpsys.yo	2000/04/01 20:43:44	1.2
+++ Doc/Zsh/zftpsys.yo	2000/05/08 10:18:04
@@ -522,14 +522,14 @@
 values will then be used throughout the zftp function system.  For more
 precise control, the first argument, which gives a context in which the
 style applies, can be modified to include a particular function, as for
-example `tt(:zftp:zfget:)': the style will then have the given value only
+example `tt(:zftp:zfget)': the style will then have the given value only
 in the tt(zfget) function.  Values for the same style in different contexts
 may be set; the most specific function will be used, where
 strings are held to be more specific than patterns, and longer patterns and
 shorter patterns.  Note that only the top level function name, as called by
 the user, is used; calling of lower level functions is transparent to the
 user.  Hence modifications to the title bar in tt(zftp_chpwd) use the
-contexts tt(:zftp:zfopen:), tt(:zftp:zfcd:), etc., depending where it was
+contexts tt(:zftp:zfopen), tt(:zftp:zfcd), etc., depending where it was
 called from.  The following styles are understood:
 
 startitem()
Index: Functions/Zftp/zfanon
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfanon,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 zfanon
--- Functions/Zftp/zfanon	1999/12/15 21:33:38	1.1.1.4
+++ Functions/Zftp/zfanon	2000/05/08 10:18:04
@@ -2,7 +2,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfanon:
+[[ $curcontext = :zf* ]] || local curcontext=:zfanon
 local opt opt_1 dir
 
 while getopts :1 opt; do
Index: Functions/Zftp/zfcd
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfcd,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfcd
--- Functions/Zftp/zfcd	1999/12/15 21:33:38	1.1.1.3
+++ Functions/Zftp/zfcd	2000/05/08 10:18:04
@@ -20,7 +20,7 @@
 #     work just as long as the directory structures under the home match.
 
 emulate -L zsh
-[[ $curcontext = :zf*: ]] || local curcontext=:zfcd:
+[[ $curcontext = :zf* ]] || local curcontext=:zfcd
 
 if [[ $1 = /* ]]; then
   zfautocheck -dn || return 1
Index: Functions/Zftp/zfcget
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfcget,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfcget
--- Functions/Zftp/zfcget	1999/12/15 21:33:38	1.1.1.3
+++ Functions/Zftp/zfcget	2000/05/08 10:18:04
@@ -12,7 +12,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfcget:
+[[ $curcontext = :zf* ]] || local curcontext=:zfcget
 local loc rem stat=0 opt opt_G opt_t remlist locst remst
 local tmpfile=${TMPPREFIX}zfcget$$ rstat tsize
 
Index: Functions/Zftp/zfclose
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfclose,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zfclose
--- Functions/Zftp/zfclose	1999/12/15 21:33:38	1.1.1.2
+++ Functions/Zftp/zfclose	2000/05/08 10:18:04
@@ -1,4 +1,4 @@
 # function zfclose {
-[[ $curcontext = :zf*: ]] || local curcontext=:zfclose:
+[[ $curcontext = :zf* ]] || local curcontext=:zfclose
 zftp close
 # }
Index: Functions/Zftp/zfcput
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfcput,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zfcput
--- Functions/Zftp/zfcput	1999/12/15 21:33:38	1.1.1.2
+++ Functions/Zftp/zfcput	2000/05/08 10:18:04
@@ -12,7 +12,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfcput:
+[[ $curcontext = :zf* ]] || local curcontext=:zfcput
 local loc rem stat=0 locst remst offs tailtype
 local tmpfile=${TMPPREFIX}zfcget$$ rstat
 
Index: Functions/Zftp/zfdir
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfdir,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 zfdir
--- Functions/Zftp/zfdir	1999/12/20 15:39:55	1.1.1.4
+++ Functions/Zftp/zfdir	2000/05/08 10:18:04
@@ -22,7 +22,7 @@
 emulate -L zsh
 setopt extendedglob
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfdir:
+[[ $curcontext = :zf* ]] || local curcontext=:zfdir
 local file opt optlist redir i newargs force
 local curdir=$zfconfig[curdir_$ZFTP_SESSION]
 local otherdir=$zfconfig[otherdir_$ZFTP_SESSION]
Index: Functions/Zftp/zfgcp
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfgcp,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfgcp
--- Functions/Zftp/zfgcp	1999/12/15 21:33:38	1.1.1.3
+++ Functions/Zftp/zfgcp	2000/05/08 10:18:04
@@ -16,7 +16,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfgcp:
+[[ $curcontext = :zf* ]] || local curcontext=:zfgcp
 local opt remlist rem loc opt_G opt_t
 integer stat do_close
 
Index: Functions/Zftp/zfget
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfget,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 zfget
--- Functions/Zftp/zfget	1999/12/15 21:33:38	1.1.1.4
+++ Functions/Zftp/zfget	2000/05/08 10:18:04
@@ -19,7 +19,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfget:
+[[ $curcontext = :zf* ]] || local curcontext=:zfget
 local loc rem opt remlist opt_G opt_t opt_c
 integer stat do_close
 
Index: Functions/Zftp/zfgoto
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfgoto,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 zfgoto
--- Functions/Zftp/zfgoto	1999/12/15 21:33:39	1.1.1.5
+++ Functions/Zftp/zfgoto	2000/05/08 10:18:04
@@ -8,7 +8,7 @@
 
 emulate -L zsh
 setopt extendedglob
-[[ $curcontext = :zf*: ]] || local curcontext=:zfgoto:
+[[ $curcontext = :zf* ]] || local curcontext=:zfgoto
 
 # Set ZFTP_BMFILE if not already set.  This should agree with
 # the corresponding line in zfmark.
Index: Functions/Zftp/zfhere
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfhere,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zfhere
--- Functions/Zftp/zfhere	1999/12/15 21:33:39	1.1.1.2
+++ Functions/Zftp/zfhere	2000/05/08 10:18:04
@@ -1,6 +1,6 @@
 # function zfhere {
 # Change to the directory corresponding to $PWD on the server.
 # See zfcd for how this works.
-[[ $curcontext = :zf*: ]] || local curcontext=:zfhere:
+[[ $curcontext = :zf* ]] || local curcontext=:zfhere
 zfcd $PWD
 # }
Index: Functions/Zftp/zfls
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfls,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zfls
--- Functions/Zftp/zfls	1999/12/15 21:33:39	1.1.1.2
+++ Functions/Zftp/zfls	2000/05/08 10:18:04
@@ -1,7 +1,7 @@
 # function zfls {
 
 emulate -L zsh
-[[ $curcontext = :zf*: ]] || local curcontext=:zfls:
+[[ $curcontext = :zf* ]] || local curcontext=:zfls
 
 # directory hack, see zfcd
 if [[ $1 = $HOME || $1 = $HOME/* ]]; then
Index: Functions/Zftp/zfmark
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfmark,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 zfmark
--- Functions/Zftp/zfmark	1999/12/15 21:33:39	1.1.1.4
+++ Functions/Zftp/zfmark	2000/05/08 10:18:04
@@ -7,7 +7,7 @@
 
 emulate -L zsh
 setopt extendedglob
-[[ $curcontext = :zf*: ]] || local curcontext=:zfmark:
+[[ $curcontext = :zf* ]] || local curcontext=:zfmark
 
 # Set ZFTP_BMFILE if not already set.  This should agree with
 # the corresponding line in zfgoto.
Index: Functions/Zftp/zfopen
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfopen,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 zfopen
--- Functions/Zftp/zfopen	1999/12/15 21:33:39	1.1.1.5
+++ Functions/Zftp/zfopen	2000/05/08 10:18:04
@@ -7,7 +7,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfopen:
+[[ $curcontext = :zf* ]] || local curcontext=:zfopen
 local opt dir opt_1 setparams
 
 while getopts :1 opt; do
Index: Functions/Zftp/zfparams
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfparams,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfparams
--- Functions/Zftp/zfparams	1999/12/15 21:33:39	1.1.1.3
+++ Functions/Zftp/zfparams	2000/05/08 10:18:04
@@ -1,7 +1,7 @@
 # function zfparams {
 
 emulate -L zsh
-[[ $curcontext = :zf*: ]] || local curcontext=:zfparams:
+[[ $curcontext = :zf* ]] || local curcontext=:zfparams
 
 if [[ $# -eq 1 && $1 = - ]]; then
   # Delete existing parameter set.
Index: Functions/Zftp/zfpcp
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfpcp,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfpcp
--- Functions/Zftp/zfpcp	1999/12/15 21:33:39	1.1.1.3
+++ Functions/Zftp/zfpcp	2000/05/08 10:18:04
@@ -14,7 +14,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfpcp:
+[[ $curcontext = :zf* ]] || local curcontext=:zfpcp
 local rem loc
 integer stat do_close
 
Index: Functions/Zftp/zfput
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfput,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zfput
--- Functions/Zftp/zfput	1999/12/15 21:33:39	1.1.1.2
+++ Functions/Zftp/zfput	2000/05/08 10:18:04
@@ -11,7 +11,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfput:
+[[ $curcontext = :zf* ]] || local curcontext=:zfput
 local opt opt_r
 integer stat do_close abort
 
Index: Functions/Zftp/zfsession
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfsession,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zfsession
--- Functions/Zftp/zfsession	1999/12/15 21:33:39	1.1.1.2
+++ Functions/Zftp/zfsession	2000/05/08 10:18:05
@@ -3,7 +3,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfsession:
+[[ $curcontext = :zf* ]] || local curcontext=:zfsession
 local opt opt_l opt_v opt_o opt_d hadopts
 
 while getopts ":lovd" opt; do
Index: Functions/Zftp/zfstat
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfstat,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfstat
--- Functions/Zftp/zfstat	1999/12/15 21:33:39	1.1.1.3
+++ Functions/Zftp/zfstat	2000/05/08 10:18:05
@@ -6,7 +6,7 @@
 setopt localoptions unset
 unsetopt ksharrays
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfstat:
+[[ $curcontext = :zf* ]] || local curcontext=:zfstat
 local i stat=0 opt opt_v
 
 while getopts :v opt; do
Index: Functions/Zftp/zftransfer
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zftransfer,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zftransfer
--- Functions/Zftp/zftransfer	1999/12/15 21:33:39	1.1.1.2
+++ Functions/Zftp/zftransfer	2000/05/08 10:18:05
@@ -4,7 +4,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zftransfer:
+[[ $curcontext = :zf* ]] || local curcontext=:zftransfer
 local sess1 sess2 file1 file2 oldsess=${ZFTP_SESSION}
 
 if [[ $# -ne 2 ]]; then
@@ -41,7 +41,7 @@
 # To avoid that, try to get the size and set it for the progress to
 # see.
 local style
-zstyle -s ':zftp:zftransfer:' progress style
+zstyle -s ':zftp:zftransfer' progress style
 if [[ -n $style && $style != none ]]; then
   local ZFTP_TSIZE array tmpfile=${TMPPREFIX}zft$$
   zftp remote $file1 >$tmpfile 2>/dev/null
Index: Functions/Zftp/zftype
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zftype,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 zftype
--- Functions/Zftp/zftype	1999/12/15 21:33:39	1.1.1.2
+++ Functions/Zftp/zftype	2000/05/08 10:18:05
@@ -1,6 +1,6 @@
 # function zftype {
 local type zftmp=${TMPPREFIX}zftype$$
-[[ $curcontext = :zf*: ]] || local curcontext=:zftype:
+[[ $curcontext = :zf* ]] || local curcontext=:zftype
 
 zfautocheck -d
 
Index: Functions/Zftp/zfuget
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfuget,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfuget
--- Functions/Zftp/zfuget	1999/12/15 21:33:39	1.1.1.3
+++ Functions/Zftp/zfuget	2000/05/08 10:18:05
@@ -25,7 +25,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfuget:
+[[ $curcontext = :zf* ]] || local curcontext=:zfuget
 local loc rem locstats remstats doit tmpfile=${TMPPREFIX}zfuget$$
 local rstat remlist opt opt_v opt_s opt_G opt_t
 integer stat do_close
Index: Functions/Zftp/zfuput
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfuput,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zfuput
--- Functions/Zftp/zfuput	1999/12/15 21:33:39	1.1.1.3
+++ Functions/Zftp/zfuput	2000/05/08 10:18:05
@@ -11,7 +11,7 @@
 
 emulate -L zsh
 
-[[ $curcontext = :zf*: ]] || local curcontext=:zfuput:
+[[ $curcontext = :zf* ]] || local curcontext=:zfuput
 local loc rem locstats remstats doit tmpfile=${TMPPREFIX}zfuput$$
 local rstat opt opt_v opt_s
 integer stat do_close

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



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