@@ -10,6 +10,7 @@ import untildify from 'untildify'
1010const toolExtensionMap = new Map ( [
1111 [ 'ruby' , 'rb' ] ,
1212 [ 'python' , 'py' ] ,
13+ [ 'python3' , 'py' ] ,
1314 [ 'perl' , 'pl' ] ,
1415 [ 'php' , 'php' ] ,
1516 [ 'node' , 'js' ] ,
@@ -26,12 +27,20 @@ const toolExtensionMap = new Map([
2627 [ 'clojure' , 'clj' ] ,
2728 [ 'elixir' , 'ex' ] ,
2829 [ 'erlang' , 'erl' ] ,
29- [ 'ocaml' , 'ml' ]
30+ [ 'ocaml' , 'ml' ] ,
31+ [ 'osascript' , 'scpt' ] ,
32+ [ 'deno' , 'ts' ] ,
33+ [ 'kotlin' , 'kt' ] ,
34+ [ 'julia' , 'jl' ] ,
35+ [ 'dart' , 'dart' ] ,
36+ [ 'haskell' , 'hs' ] ,
37+ [ 'csharp' , 'cs' ]
3038] )
3139
3240const toolCommandMap = new Map ( [
3341 [ 'ruby' , ( scriptPath ) => `ruby ${ scriptPath } ` ] ,
3442 [ 'python' , ( scriptPath ) => `python ${ scriptPath } ` ] ,
43+ [ 'python3' , ( scriptPath ) => `python3 ${ scriptPath } ` ] ,
3544 [ 'perl' , ( scriptPath ) => `perl ${ scriptPath } ` ] ,
3645 [ 'php' , ( scriptPath ) => `php ${ scriptPath } ` ] ,
3746 [ 'node' , ( scriptPath ) => `node ${ scriptPath } ` ] ,
@@ -49,7 +58,14 @@ const toolCommandMap = new Map([
4958 [ 'clojure' , ( scriptPath ) => `clojure ${ scriptPath } ` ] ,
5059 [ 'elixir' , ( scriptPath ) => `elixir ${ scriptPath } ` ] ,
5160 [ 'erlang' , ( scriptPath ) => `escript ${ scriptPath } ` ] ,
52- [ 'ocaml' , ( scriptPath ) => `ocaml ${ scriptPath } ` ]
61+ [ 'ocaml' , ( scriptPath ) => `ocaml ${ scriptPath } ` ] ,
62+ [ 'osascript' , ( scriptPath ) => `osascript ${ scriptPath } ` ] ,
63+ [ 'deno' , ( scriptPath ) => `deno run ${ scriptPath } ` ] ,
64+ [ 'kotlin' , ( scriptPath ) => `kotlinc -script ${ scriptPath } ` ] ,
65+ [ 'julia' , ( scriptPath ) => `julia ${ scriptPath } ` ] ,
66+ [ 'dart' , ( scriptPath ) => `dart run ${ scriptPath } ` ] ,
67+ [ 'haskell' , ( scriptPath ) => `runhaskell ${ scriptPath } ` ] ,
68+ [ 'csharp' , ( scriptPath ) => `dotnet script ${ scriptPath } ` ]
5369] )
5470
5571export let runScriptlet = async ( focusedScriptlet : Scriptlet , inputs : string [ ] , flag ?: Flags ) => {
0 commit comments