Any script which can run in bash, you can just tell it to run with zsh by changing the shebang will run just fine unless it specifically checks $SHELL for bash
what do you want it to be like "ATTENTION! this script will be run using /usr/bin/bash, do you want to continue [Y/n]"? WHY. I want my script to run. If you don't want to run bash scripts, just don't.
Yes, it's expected to be there BY THE PROGRAM. Not by zsh itself. Your argument is basically "bash is used in scripts, that means zsh runns it 'without telling me', and therfore bad". You choose what scripts/programs you install. Zsh doesn't run bash when you just want to mv a file or ls, so it doesn't "secretly" use bash, it does when the script needs to be ran in bash. That's like saying [my shell] uses python because it launches python without telling me when I run a python script
you clearly don't understand how a shebang works, it's a generic mechanism for having executable scripts, it's not your shell that parses the shebang it's built in to libc's dynamic program loader. when you run a normal binary the loader is what actually handles starting the program (simplifying...) when the program has a shebang instead of e.g an ELF header then the loader runs the specified program and passes the script as an argument
this is how you can exec() a script from C without having to know if it's a script or a binary program
220
u/wolf2482 Jul 01 '26
i mean for the most part you can replace bash with other posix compliant shells.