|
|
|
|
|
by k776
158 days ago
|
|
I wonder if bash has a way to override the default function calling mechanism. Since functions in bashrc would probably take priority, maybe something like this could be possible: (psuedo code) ``` execve(path, args) { if path.endsWith('.go') {
go run path args
} else {
super($path, *args)
}
}``` Then when you run `./script.go`, the function gets called and passes it so `go run`, while everything else goes through the existing execve function. That would be interesting, because then you could do this with absolutely anything. `./script.rb` `./script.py` `./script.c` etc |
|