aboutsummaryrefslogtreecommitdiff
path: root/ksh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-06 16:22:51 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-06 16:22:51 +1300
commit37233f6c0e11c8ab29b91ae1eeb7fd5595cc26d9 (patch)
treedb48f380ad35fcfdd6e566e5565c5305421de3ef /ksh
parentfe55f1529ad26e4963b9368af401c673db4659e4 (diff)
downloaddotfiles-37233f6c0e11c8ab29b91ae1eeb7fd5595cc26d9.tar.gz
Add a couple of ksh options
Diffstat (limited to 'ksh')
-rw-r--r--ksh/kshrc13
1 files changed, 12 insertions, 1 deletions
diff --git a/ksh/kshrc b/ksh/kshrc
index cf7812d6..934156d1 100644
--- a/ksh/kshrc
+++ b/ksh/kshrc
@@ -1,7 +1,18 @@
-# Emacs-style key bindings
+# Emacs-style key bindings; these are present in ksh88 and pdksh
set -o braceexpand
set -o emacs
+# 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
HISTSIZE=$((1 << 10))