about summary refs log tree commit diff stats
path: root/config/ksh/kshrc
blob: e81bd97e265b2b51e9add10565d5b6ac778bd50e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/ksh
. $HOME/etc/shrc
KSHCONFIG="$XDG_CONFIG_HOME/ksh"
FPATH=$XDG_CONFIG_HOME/ksh/functions
alias functions="cat \$FPATH/*|grep -vF '#!/bin/ksh'"

HISTFILE=$XDG_DATA_HOME/ksh/histfile
if ! [[ -d $(dirname $HISTFILE) ]]; then
	mkdir -p $(dirname $HISTFILE);
fi
HISTSIZE=5000
HISTCONTROL="ignoredups"
TMPDIR=$XDG_CACHE_HOME/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 uptime 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:$XDG_DATA_HOME/man"
else
export MANPATH="/usr/share/man:/usr/local/share/man:$XDG_DATA_HOME/man"
fi
set -o vi

#load ksh external configs
[[ -f "$XDG_CONFIG_HOME/lf/lfcd.sh" ]] && . "$XDG_CONFIG_HOME/lf/lfcd.sh"
[[ -f "$KSHCONFIG/diraliases" ]] && . "$KSHCONFIG/diraliases"
[[ -f "$XDG_CONFIG_HOME/aliasrc" ]] && . "$XDG_CONFIG_HOME/aliasrc"
[[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh"
[[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh"