Impressive…
How people manage to poison even old-school shell scripts with useless bloat.
If you want to source remote scripts that badly (despite this being against policies of almost every company), better keep it simple:
telesource() { f=~/.cache/${1/\//} ; [ -f "$f" ] || curl -SsLo "$f" "$1" && source "$f" ; }
So you can invoke it like that: # The URL is downloaded once, cached forever, and then sourced
telesource https://git.io/fAWiz
What does the name ``import`` even mean? Does it anyhow relate to sourcing? Or even shell scripting at all?Now I'm waiting for a full JIT ECMAScript VM in pure portable Bash. Impress me even more ;)
Nonetheless, that's what it looks like to me. I'm just not fond of spilling idioms from one technology to everything else its users touch. That's much like our IT equivalent of Midas touch.