I'm trying to make a shell for the desktop environment I'm designing which is just a configured Zsh, and I'm confused about how to pass along whether it's a login shell or not.
Here's my script:
#!/bin/sh
case "$0" in
-*) ZDOTDIR=/etc/tiles/zsh exec zsh -l "$@";;
*) ZDOTDIR=/etc/tiles/zsh exec zsh "$@";;
esac
I have installed it to /bin/tiles-shell, added that path to /etc/shells, and made it my shell with chsh.
The problem is it's never a login shell because $0 seems to always be /bin/tiles-shell. I thought it would start with - when it should be a login shell?
-I think? So you'd want something more likecase $0 in -*)-at the start of$0itself anyway? is the wrapper really needed for that?