diff --git a/home/shrc b/home/shrc index 8fdddec..ad5d449 100644 --- a/home/shrc +++ b/home/shrc @@ -5,7 +5,7 @@ unset FANCY; _=: && [ -z $_ ] && FANCY=1 || FANCY=0 # detect zsh and bash if [ "$FANCY" = 0 ]; then . ~/.prep; fi # handle stuff like /etc/profile and $PATH # combine and load everything containing "YES_MYSHELL" in ~/sh/: -[ -z "${0##/*}" ] && sh=zsh || sh="$0" # zsh replaces $0, so hardcode it +[ -z "${0##/*}" ] && sh=zsh || sh="${0#-}" # zsh replaces $0, so hardcode it { [ -d "${XDG_CACHE_HOME:="$HOME/.cache"}" ] || mkdir "$XDG_CACHE_HOME"; } && { [ -d "$XDG_CACHE_HOME/shrc" ] || mkdir "$XDG_CACHE_HOME/shrc"; } && cache="$XDG_CACHE_HOME/shrc/$sh-$$" && diff --git a/sh/recombine b/sh/recombine index fbeed15..2204f52 100644 --- a/sh/recombine +++ b/sh/recombine @@ -2,7 +2,7 @@ # FAKE_COMPAT cd ~/sh && unset IFS || exit -[ -z "${0##/*}" ] && sh=zsh || sh="$0" # zsh replaces $0, so hardcode it +[ -z "${0##/*}" ] && sh=zsh || sh="${0#-}" # zsh replaces $0, so hardcode it case "$sh" in (ash) SH=ASH;; (bash) SH=BASH;;