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:
parent
0ca819ffc4
commit
28b4942252
1 changed files with 9 additions and 1 deletions
10
sh/recombine
10
sh/recombine
|
@ -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;;
|
||||
|
|
Loading…
Reference in a new issue