Closed faokryn closed 4 years ago
My first experience with Rust so if there's a better way to go about this, I'd be happy to learn. This just seemed like a clean way to do it without changing the existing code too much.
The way I would go about this is taking the base file name of $0
with the std::path
crate and matching against that (ec19904).
Anyway, thanks for the pull request.
Fixes bug that caused a panic in terminal emulators that return the full path for $0 (e.g. "/bin/bash" instead of "bash") when users set $SILVER_SHELL to $0 as instructed. Also adds a more descriptive panic message.
Closes #16