diff --git a/home/shrc b/home/shrc index 978f234..1dfbf82 100644 --- a/home/shrc +++ b/home/shrc @@ -4,6 +4,13 @@ unset FANCY; _=: && [ -z $_ ] && FANCY=1 || FANCY=0 # detect zsh and bash if [ "$FANCY" = 0 ]; then . ~/.prep; fi # handle stuff like /etc/profile and $PATH +if [ -n "$ZSH_VERSION" ] && case $- in (im|ilm) :;; (?*) ! :;; (*) :; esac +then emulate zsh && setopt histexpiredupsfirst histreduceblanks rcquotes \ +histignorespace completealiases normstarsilent histsavenodups kshtypeset \ +histignoredups completeinword nopromptsubst sharehistory pathdirs notify \ +promptpercent noflowcontrol menucomplete extendedglob alwaystoend nobeep \ +histverify chaselinks autopushd braceccl autocd; fi # if .zshrc hasn't run + # combine and load everything containing "YES_MYSHELL" in ~/sh/: [ -z "${0##/*}" ] && sh=zsh || sh="${0#-}" # zsh replaces $0, so hardcode it { [ -d "${XDG_CACHE_HOME:="$HOME/.cache"}" ] || mkdir "$XDG_CACHE_HOME"; } && diff --git a/sh/recombine b/sh/recombine index 1c00b41..f9c3fd6 100644 --- a/sh/recombine +++ b/sh/recombine @@ -40,7 +40,6 @@ esac [ "$SH" != ZSH ] || set -o SH_WORD_SPLIT printf %s\\n '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' -[ "$SH" != ZSH ] || printf %s\\n 'emulate zsh' for f in "${HOME:?}/sh"/*; do [ -n "${f##*.*}" ] && [ -f "$f" ] || continue i=10 ok=