mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:39:03 -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:
parent
c990f163e4
commit
85869d590d
2 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,13 @@
|
||||||
unset FANCY; _=: && [ -z $_ ] && FANCY=1 || FANCY=0 # detect zsh and bash
|
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 [ "$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/:
|
# 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:="$HOME/.cache"}" ] || mkdir "$XDG_CACHE_HOME"; } &&
|
||||||
|
|
|
@ -40,7 +40,6 @@ esac
|
||||||
[ "$SH" != ZSH ] || set -o SH_WORD_SPLIT
|
[ "$SH" != ZSH ] || set -o SH_WORD_SPLIT
|
||||||
|
|
||||||
printf %s\\n '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' ''
|
printf %s\\n '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' ''
|
||||||
[ "$SH" != ZSH ] || printf %s\\n 'emulate zsh'
|
|
||||||
for f in "${HOME:?}/sh"/*; do
|
for f in "${HOME:?}/sh"/*; do
|
||||||
[ -n "${f##*.*}" ] && [ -f "$f" ] || continue
|
[ -n "${f##*.*}" ] && [ -f "$f" ] || continue
|
||||||
i=10 ok=
|
i=10 ok=
|
||||||
|
|
Loading…
Reference in a new issue