Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was just wondering how you accomplish that.


I put this at the end of my ~/.profile:

    REALSHELLS="/usr/local/bin/zsh /usr/bin/zsh"
    for REALSHELL in $REALSHELLS; do
    	if [ -e $REALSHELL ]; then
    		if ! $REALSHELL -l; then
    			echo "$REALSHELL exit $?"
    		fi
    		echo "$SHELL exit in 1s, Ctrl-C to abort"
    		sleep 1 && exit
    	fi
    done
    echo "No shells in [$REALSHELLS] found, falling back to $SHELL"




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: