From: Graham Knop Date: Thu, 2 Jan 2014 02:17:04 +0000 (-0500) Subject: extensions may not always be included in shell on windows X-Git-Tag: v2.000004~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb6115c230d4e3b8beed851e5ab743ae7589a815;p=p5sagit%2Flocal-lib.git extensions may not always be included in shell on windows --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index dc5daef..1089963 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -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'; } }