summaryrefslogtreecommitdiffstats
path: root/tests/histexp4.sub
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/histexp4.sub23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/histexp4.sub b/tests/histexp4.sub
new file mode 100644
index 0000000..ddc3bb3
--- /dev/null
+++ b/tests/histexp4.sub
@@ -0,0 +1,23 @@
+HISTFILE=$TMPDIR/bashhist-$$
+
+set -o history
+set -o histexpand
+
+echo a
+cat < <(echo !!)
+
+echo b
+echo !! `echo !!`
+
+echo c
+echo "$(echo "!" )"
+
+echo d
+echo "$(echo '!' )"
+
+echo e
+echo '!' "!"
+echo "'!'"
+
+set +o history
+rm -f $HISTFILE