config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit eece46a652f929a924cf4ff28fb4bfd00aacfe0e
parent f226339400f9ed2b47183f6138276add620b9c80
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Mon, 15 Feb 2021 11:59:09 -0800

Move SHELL_MODULE_DIR definition to ~/.profile

It doesn't make sense for it to be in the ksh(1) rc file since it's
really valid for any POSIX-ish shell. Also combine the multiple
`set' calls into one.

Diffstat:
Mmodules/ksh/.config/ksh.kshrc | 9+--------
Mmodules/profile/.profile | 6++++++
2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/modules/ksh/.config/ksh.kshrc b/modules/ksh/.config/ksh.kshrc @@ -1,13 +1,6 @@ # ksh init file -set -Xbh -set -o vi - -if test -d $XDG_CONFIG_HOME/shell; then - SHELL_MODULE_DIR=$XDG_CONFIG_HOME/shell -else - SHELL_MODULE_DIR=/usr/local/share/shell -fi +set -Xbh -o vi test -f $SHELL_MODULE_DIR/main && . $SHELL_MODULE_DIR/main test -f $XDG_CONFIG_HOME/dalias && diff --git a/modules/profile/.profile b/modules/profile/.profile @@ -34,6 +34,12 @@ export LESSHISTFILE="/dev/null" export MAKEFLAGS="CC=${CC}" export SHELL_MODULES="aliases cd etc fs hist mpc openbsd private sys xorg" +if test -d $XDG_CONFIG_HOME/shell; then + export SHELL_MODULE_DIR=$XDG_CONFIG_HOME/shell +else + export SHELL_MODULE_DIR=/usr/local/share/shell +fi + # cache frequently used files cat `which $BROWSER $EDITOR $PAGER $SHELL $TERMINAL $CC tmux git` >/dev/null