summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2010-11-02 23:44:29 +0000
committerjilles <jilles@FreeBSD.org>2010-11-02 23:44:29 +0000
commit000173def65316b21deddb738309d1f6643d6851 (patch)
treec6529bbc325307b325b642cc929cce790ae62f8e /tools
parentfa419e93b75ab1483de6709c29a456e1dd6422f8 (diff)
downloadFreeBSD-src-000173def65316b21deddb738309d1f6643d6851.zip
FreeBSD-src-000173def65316b21deddb738309d1f6643d6851.tar.gz
sh: Fix some issues with aliases and case, by importing dash checkkwd code.
This moves the function of the noaliases variable into the checkkwd variable. This way it is properly reset on errors and aliases can be used normally in the commands for each case (the case labels recognize the keyword esac but no aliases). The new code is clearer as well. Obtained from: dash
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/parser/alias3.06
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/parser/alias3.0 b/tools/regression/bin/sh/parser/alias3.0
new file mode 100644
index 0000000..e0721e2
--- /dev/null
+++ b/tools/regression/bin/sh/parser/alias3.0
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+alias alias0=exit
+x=alias0
+eval 'case $x in "alias0") alias0 0;; esac'
+exit 1
OpenPOWER on IntegriCloud