| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
This patch adds support for the -l option (login shell) as required
by the LSB.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dash(1) in Debian stable does not support "set +o" in the manner
specified by SUSv3:
|+o
| Write the current option settings to standard output in a format
| that is suitable for reinput to the shell as commands that
| achieve the same options settings.
(citation from
http://www.opengroup.org/onlinepubs/009695399/utilities/set.html)
Instead, dash's "set +o" prints the shell's options in a
human-readable format.
Here is a simple test program that exercises this feature; it works as
I believe is required under bash, but not under dash.
# Save the shell's options
set +o > /tmp/settings-commands
set -o | sort > /tmp/settings-before
# Change some options.
set -v
set -f
set -x
set +o emacs
set -o vi
# Try to restore our options.
. /tmp/settings-commands
set -o | sort > /tmp/settings-after
# Compare.
diff /tmp/settings-before /tmp/settings-after
I believe the following small patch adds this feature to dash, and
documents it in the manual page:
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
|
|
|
| |
This patch adds a flag argument to setvarint and uses it to set the OPTIND
variable.
|
|
|
|
|
| |
The only user of setvarsafe is getopts. However, we can achieve the same
result by pre-setting the value of shellparam.optind.
|
|
|
|
|
|
|
|
| |
Previously setting OPTIND to 0 would cause subsequent getopts calls to fail.
This patch makes dash reset the getopts parameters the same way as OPTIND=1.
Both behaviours are allowed by POSIX but other common shells do tolerate this
case.
|
|
|
|
|
|
|
|
|
|
|
| |
This change updates the BSD licence to the three-clause version since
NetBSD has already done so. This makes dash GPL-compatible.
It also adds Christos Zoulas (NetBSD ash maintainer) to the COPYING file.
I've added "copyright by Herbert Xu" to most files.
Finally all CVS IDs and inclusion of sys/cdefs.h have been removed.
The latter is needed for support of klibc.
|
| |
|
| |
|
|
|