about summary refs log tree commit diff
path: root/Functions/Zftp/zfrglob
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Zftp/zfrglob')
-rw-r--r--Functions/Zftp/zfrglob7
1 files changed, 6 insertions, 1 deletions
diff --git a/Functions/Zftp/zfrglob b/Functions/Zftp/zfrglob
index f9d67b3f2..fad0c3849 100644
--- a/Functions/Zftp/zfrglob
+++ b/Functions/Zftp/zfrglob
@@ -9,7 +9,8 @@
 #      stick with a single directory.  This is the default.
 #  (2) Use remote globbing, i.e. pass it to ls at the site.
 #      Faster, but only works with UNIX, and only basic globbing.
-#      We do this if $zfrglob is non-null.
+#      We do this if zfconfig[remote_glob] (or $zfrglob for
+#      backward compatibility) is non-null.
 
 # There is only one argument, the variable containing the
 # pattern to be globbed.  We set this back to an array containing
@@ -20,6 +21,10 @@ setopt extendedglob
 
 local pat dir nondir files i
 
+if [[ -n ${zfconfig[remote_glob]} ]]; then
+  local zfrglob=1
+fi
+
 eval pat=\$$1
 
 # Check if we really need to do anything.  Look for standard