3 ms·
>Best way to do this is wrap the whole script into a function and then execute at the last line[0]. It's not the best way. If your function is named `lsp_init`
by Arnavion 3y ago
>Best way to do this is wrap the whole script into a function and then execute at the last line[0].
It's not the best way. If your function is named `lsp_init` and your last line is `lsp_init`, a partial line can result in the execution of `ls`.
AFAIK the best way is to just wrap your script in `()`.
- godelski 3y agoYou're right! That's a good thing to point out. Elsewhere I suggested Rust change their install to this though. Solves pretty much all the probems curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust_install.sh && sh /tmp/rust_install.sh (obviously doesn't solve the problem of inspection, but I think we all know that's not going to happen anyways)