init.sh: explain why $EXEEXT support uses aliases rather than functions
authorJim Meyering <meyering@redhat.com>
Tue, 8 May 2012 09:54:26 +0000 (11:54 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 8 May 2012 12:56:49 +0000 (14:56 +0200)
* tests/init.sh: Add a comment.

ChangeLog
tests/init.sh

index 268fbe5..e202346 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-05-08  Jim Meyering  <meyering@redhat.com>
 
+       init.sh: explain why EXEEXT support uses aliases rather than functions
+       * tests/init.sh: Add a comment.
+
        init.sh: don't let bash aliases interfere with tests
        * tests/init.sh: Undefine any pre-defined aliases if the selected shell
        is bash.  This avoids problems for those who alias standard commands to
index d5cd294..f525a7c 100644 (file)
@@ -210,6 +210,11 @@ fi
 # If this is bash, turn off all aliases.
 test -n "$BASH_VERSION" && unalias -a
 
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above.  Why use aliases rather
+# than functions?  Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
 test -n "$EXEEXT" && shopt -s expand_aliases
 
 # Enable glibc's malloc-perturbing option.