From: Graham Knop Date: Thu, 26 Dec 2013 23:49:33 +0000 (-0500) Subject: fish fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=commitdiff_plain;h=ecc3a2eebf44c44f730f094f8ac392ded97c49e4 fish fixes --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 9fd7017..6685519 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -444,7 +444,7 @@ sub wrap_powershell_output { sub build_fish_env_declaration { my ($class, $name, $args) = @_; - my $value = $class->_interpolate($args, '"%s"', '"', '\\%s'); + my $value = $class->_interpolate($args, '$%s', '"', '\\%s'); if (!defined $value) { return qq{set -e $name;\n}; } @@ -567,6 +567,7 @@ sub guess_shelltype { for ($shellbin) { return /csh$/ ? 'csh' + : /fish/ ? 'fish' : /command(?:\.com)?$/i ? 'cmd' : /cmd(?:\.exe)?$/i ? 'cmd' : /4nt(?:\.exe)?$/i ? 'cmd' diff --git a/t/shell.t b/t/shell.t index 52ecee8..dc8fd1a 100644 --- a/t/shell.t +++ b/t/shell.t @@ -29,6 +29,9 @@ for my $shell ( opt => '-f', }, { + name => 'fish', + }, + { name => 'cmd.exe', opt => '/Q /D /C', ext => 'bat',