From 944bcb63f0b56cb1b2ac5ace64743a66a9f3b650 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 9 Feb 2023 15:49:32 -0600 Subject: fix e alias in *ksh and zsh --- kshrc | 2 ++ mksh/mkshrc | 5 ++++- sh/aliases | 4 ---- zsh/.zshrc | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/kshrc b/kshrc index cd372c4..82c58fb 100644 --- a/kshrc +++ b/kshrc @@ -5,6 +5,8 @@ [ -f $HOME/.config/sh/aliases ] && . $HOME/.config/sh/aliases [ -f $HOME/.config/sh/functions ] && . $HOME/.config/sh/functions +alias e='. $ENV' + RED="\033[1;31m" GRE="\033[1;32m" YEL="\033[1;33m" diff --git a/mksh/mkshrc b/mksh/mkshrc index 5b61ae3..8d17b8e 100644 --- a/mksh/mkshrc +++ b/mksh/mkshrc @@ -26,9 +26,12 @@ # catch non-mksh, non-lksh, trying to run this file case ${KSH_VERSION:-} in *LEGACY\ KSH*|*MIRBSD\ KSH*) ;; -*) \return 0 ;; +*) . $CONFIG/kshrc && exit ;; esac +[ -f "$HOME/.config/sh/aliases" ] && . "$HOME/.config/sh/aliases" +[ -f "$HOME/.config/sh/functions" ] && . "$HOME/.config/sh/functions" + # give MidnightBSD's laffer1 a bit of csh feeling function setenv { if (( $# )); then diff --git a/sh/aliases b/sh/aliases index 974a1d7..6face5a 100644 --- a/sh/aliases +++ b/sh/aliases @@ -45,10 +45,6 @@ alias gd='git diff' ## Single Chars alias r='cd ~ && clear && exec $SHELL' -case "$(echo $0 | sed 's/^-*//' | xargs basename)" in - "zsh") alias e='. $ZDOTDIR/.zshrc' ;; - "ksh"|"oksh") alias e='. ~/.config/kshrc' ;; -esac alias q='exit' alias c='clear' alias m='make' diff --git a/zsh/.zshrc b/zsh/.zshrc index 1c13e80..5442bc9 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -9,6 +9,8 @@ setopt HIST_IGNORE_DUPS setopt INC_APPEND_HISTORY setopt HIST_REDUCE_BLANKS +_SH="zsh" + if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then source "$XDG_CONFIG_HOME"/sh/aliases fi -- cgit v1.2.3