about summary refs log tree commit diff
path: root/Functions/MIME
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-09-11 11:26:46 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-09-11 11:26:46 +0000
commitdc6ef8c9ae613dc7fa5d98b5e03c9f70b66adbcc (patch)
tree426df0643186ef2ece82b090b0bc37cf3624f961 /Functions/MIME
parent49b4a710090cb312e8c70dc13966790c82abaab0 (diff)
downloadzsh-dc6ef8c9ae613dc7fa5d98b5e03c9f70b66adbcc.tar.gz
zsh-dc6ef8c9ae613dc7fa5d98b5e03c9f70b66adbcc.tar.xz
zsh-dc6ef8c9ae613dc7fa5d98b5e03c9f70b66adbcc.zip
Baptiste Daroussin: 27268:
remove Perl dependency from pick-web-browser
Diffstat (limited to 'Functions/MIME')
-rw-r--r--Functions/MIME/pick-web-browser15
1 files changed, 5 insertions, 10 deletions
diff --git a/Functions/MIME/pick-web-browser b/Functions/MIME/pick-web-browser
index fe42c0bf5..26f4b6bb5 100644
--- a/Functions/MIME/pick-web-browser
+++ b/Functions/MIME/pick-web-browser
@@ -74,16 +74,11 @@ for bstyle in $bstyles; do
 
     # Get the name of all windows running; use the internal name, not
     # the friendly name, which is less useful.
-    #
-    # The nasty but portable version.
-    # The nice but non-portable version uses Perl, even though perl
-    # is more portable.
-    #    windows=(${(f)"$(xwininfo -root -all | 
-    #	sed -ne 's/.*".*": ("\(.*\)" ".*").*/\1/p' |sort | uniq)"})
-
-    windows=(${(f)"$(xwininfo -root -all | 
-         perl -ne '/.*"(.*)": \("(.*)" "(.*)"\).*/ and $w{$2} = 1;
-                   END { print join("\n", keys %w), "\n" }')"})
+
+    windows=(${(ou)${(M)${(f)"$(xwininfo -root -all)"}:#*\"*\"\:[[:space:]]\(\"*}/(#b)*\"*\"\:[[:space:]]\(\"(*)\"[[:space:]]\"*\"\)*/$match[1]})
+    #windows=(${(f)"$(xwininfo -root -all |
+    #     perl -ne '/.*"(.*)": \("(.*)" "(.*)"\).*/ and $w{$2} = 1;
+    #               END { print join("\n", keys %w), "\n" }')"})
 
     # Is any browser we've heard of running?
     for browser in $xbrowsers; do