about summary refs log tree commit diff stats
path: root/etc/ksh/kshrc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/ksh/kshrc')
-rw-r--r--etc/ksh/kshrc36
1 files changed, 36 insertions, 0 deletions
diff --git a/etc/ksh/kshrc b/etc/ksh/kshrc
new file mode 100644
index 0000000..28b3c0c
--- /dev/null
+++ b/etc/ksh/kshrc
@@ -0,0 +1,36 @@
+#!/bin/ksh
+. $HOME/etc/shrc
+KSHCONFIG="$HOME_ETC/ksh"
+FPATH="$HOME_ETC/ksh/functions"
+alias functions="cat \$FPATH/*|grep -vF '#!/bin/ksh'"
+
+HISTFILE="$HOME_DATA/ksh/histfile"
+if ! [[ -d $(dirname "$HISTFILE") ]]; then
+	mkdir -p $(dirname "$HISTFILE");
+fi
+HISTSIZE=5000
+HISTCONTROL="ignoredups"
+FCEDIT="$EDITOR"
+TMPDIR="$HOME_CACHE/ksh"
+if ! [[ -d "$TMPDIR" ]]; then
+	mkdir -p "$TMPDIR";
+fi
+# shortcut for cloning
+GITHUB="https://github.com"
+# make pfetch show what i want
+export PF_INFO="ascii title os host shell editor wm pkgs palette"
+# fix manpath so local man pages work
+# crude *bsd detection
+if [[ -d /usr/X11R6 ]]; then
+export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:$HOME_DATA/man"
+else
+export MANPATH="/usr/share/man:/usr/local/share/man:$HOME_DATA/man"
+fi
+set -o vi
+
+#load ksh external configs
+[[ -f "$HOME_ETC/lf/lfcd.sh" ]] && . "$HOME_ETC/lf/lfcd.sh"
+[[ -f "$KSHCONFIG/diraliases" ]] && . "$KSHCONFIG/diraliases"
+[[ -f "$HOME_ETC/aliasrc" ]] && . "$HOME_ETC/aliasrc"
+[[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh"
+[[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh"