|
|
@ -29,7 +29,10 @@ qst hello.go - compiles & runs hello.go
|
|
29
|
29
|
var mappings = map[string]func(string) string{
|
|
30
|
30
|
".go": func(name string) string {
|
|
31
|
31
|
outpath := strings.TrimSuffix(name, path.Ext(name))
|
|
32
|
|
return fmt.Sprintf("go build -o %s %s && ./%s", outpath, name, outpath)
|
|
|
32
|
if !path.IsAbs(outpath) {
|
|
|
33
|
outpath = fmt.Sprintf("./%s", outpath)
|
|
|
34
|
}
|
|
|
35
|
return fmt.Sprintf("go build -o %s %s && %s", outpath, name, outpath)
|
|
33
|
36
|
},
|
|
34
|
37
|
".rb": func(name string) string {
|
|
35
|
38
|
return fmt.Sprintf("ruby %s", name)
|