extensions may not always be included in shell on windows
Graham Knop [Thu, 2 Jan 2014 02:17:04 +0000 (21:17 -0500)]
lib/local/lib.pm

index dc5daef..1089963 100644 (file)
@@ -554,12 +554,12 @@ sub guess_shelltype {
 
   for ($shellbin) {
     return
-        /csh/              ? 'csh'
-      : /command\.com/i    ? 'cmd'
-      : /cmd\.exe/i        ? 'cmd'
-      : /4nt\.exe/i        ? 'cmd'
-      : /powershell\.exe/i ? 'powershell'
-                           : 'bourne';
+        /csh$/                   ? 'csh'
+      : /command(?:\.com)?$/i    ? 'cmd'
+      : /cmd(?:\.exe)?$/i        ? 'cmd'
+      : /4nt(?:\.exe)?$/i        ? 'cmd'
+      : /powershell(?:\.exe)?$/i ? 'powershell'
+                                 : 'bourne';
   }
 }