summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-02-09 15:49:32 -0600
committerzachir <zachir@librem.one>2023-02-09 15:49:32 -0600
commit944bcb63f0b56cb1b2ac5ace64743a66a9f3b650 (patch)
tree0539a61823c9d83bb25b890bb5b2c8b55b6eecfc
parentc2fb36df2c383078b67462b2b93d3f77c376a2e2 (diff)
fix e alias in *ksh and zsh
-rw-r--r--kshrc2
-rw-r--r--mksh/mkshrc5
-rw-r--r--sh/aliases4
-rw-r--r--zsh/.zshrc2
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