History log of /freebsd-10.1-release/usr.bin/env/envopts.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 148142 18-Jul-2005 gad

Fix minor memory leak when expanding ${variable}s

Noticed by: Dave Hart
MFC plans: after checking with re@


# 147971 13-Jul-2005 gad

Fix two minor parsing bugs in -S processing:
1) An unquoted space is always a separator, even when not "in_arg".
2) When a new destination buffer must be allocated during variable
substitution, only copy data from the active buffer to the new
one when we *are* "in_arg".
These were noticed when testing variable-substitution of variables
which have null values, and are not inside quoted strings...

MFC plans: after a few days, and re@ approval...


# 147521 21-Jun-2005 gad

Fix a bug where the value of ${SOMEVAR} would simply disappear if there
was a separator character immediately before it. This wasn't likely to
happen in #-lines, but we might as well get it right. Also fix it so
that "" and "" will create a zero-length argument.

Approved by: re (blanket `env')


# 147493 20-Jun-2005 gad

Add the '-S' and '-P' options. The '-S' option can be used to split
apart a string, and supports some text substitutions. This can be
used to provide all the flexibility (and more!) that was lost by recent
changes to how the kernel parses #!-lines in shell scripts.

The '-P' option provides a way to specify an alternate set of directories
to use when searching for the 'utility' program to run. This way you can
be sure what directories are used for that search, without changing the
value of PATH that the user has set. Note that on FreeBSD 6.0, this
option is worthless unless the '-S' option is also used.

Approved by: re (blanket `env')