aboutsummaryrefslogtreecommitdiff
path: root/ksh/kshrc
blob: 26e0270cf26350844949e06ea88af20fb3744658 (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
# Emacs-style key bindings; these are present in ksh88 and pdksh
set -o braceexpand
set -o emacs

# Track locations of binaries
set -o trackall

# Use subshells to test these newer options, as ksh93 seems to get very upset
# if you try to set an option and it doesn't exist

# Try to get "**" as a recursive glob
(set -o globstar) 2>/dev/null &&
    set -o globstar

# Try to get !-style history expansion
(set -o histexpand) 2>/dev/null &&
    set -o histexpand

# Save history
HISTFILE=$HOME/.ksh_history

# Load any supplementary scripts
for ksh in "$HOME"/.kshrc.d/*.ksh ; do
    [[ -e $ksh ]] || continue
    . "$ksh"
done
unset -v ksh