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

fix zsh options being unset or reset

this is a crappy fix to remain until i decide on how
best to handle the basic configuration of each shell
This commit is contained in:
Connor Olding 2024-08-01 21:38:58 -07:00
parent c990f163e4
commit 85869d590d
2 changed files with 7 additions and 1 deletions

View file

@ -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"; } &&

View file

@ -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=