1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 02:59:03 -08:00

handle full paths to shells in recombine

This commit is contained in:
Connor Olding 2024-07-29 21:38:29 -07:00
parent 0ca819ffc4
commit 28b4942252

View file

@ -2,7 +2,15 @@
# FAKE_COMPAT
cd ~/sh && unset IFS || exit
[ -z "${0##/*}" ] && sh=zsh || sh="${0#-}" # zsh replaces $0, so hardcode it
case "$0" in
(-*) sh="${0#-}";;
(/*) sh="${0##*/}";;
(*) sh="$0"
esac
[ "$sh" != recombine ] || sh=zsh # only zsh does this (AFAIK)
case "$sh" in
(ash) SH=ASH c=ash;;
(bash) SH=BASH c=bash;;