FreeBSD src
Go to file
Jilles Tjoelker 84fbdd8ca0 sh: Expand assignment-like words specially for export/readonly/local.
Examples:
  export x=~
now expands the tilde
  local y=$1
is now safe, even if $1 contains IFS characters or metacharacters.

For a word to "look like an assignment", it must start with a name followed
by an equals sign, none of which may be quoted.

The special treatment applies when the first word (potentially after
"command") is "export", "readonly" or "local". There may be quoting
characters but no expansions. If "local" is overridden with a function there
is no special treatment ("export" and "readonly" cannot be overridden with a
function).

If things like
  local arr=(1 2 3)
are ever allowed in the future, they cannot call a "local" function. This
would either be a run-time error or it would call the builtin.

This matches Austin Group bug #351, planned for the next issue of POSIX.1.

PR:		bin/166771
2012-07-15 10:19:43 +00:00
bin sh: Expand assignment-like words specially for export/readonly/local. 2012-07-15 10:19:43 +00:00
cddl Merge illumos commit 13455:7205f7794835 2012-07-14 20:24:00 +00:00
contrib Pull in r159895 from upstream clang trunk: 2012-07-13 21:48:01 +00:00
crypto Merge OpenSSL 1.0.1c. 2012-07-12 19:30:53 +00:00
etc MFP4 214344: 2012-07-13 20:10:59 +00:00
games Partial revert of previous commit as some of the changes were not 2012-05-10 12:46:12 +00:00
gnu After the binutils 2.17.50 import, the assembler supports AS_REL16 2012-07-08 17:02:14 +00:00
include The register_printf_render_std() function expects regular string. 2012-07-04 17:35:07 +00:00
kerberos5 Centralize the specification of the krb5 build tools. 2012-06-01 21:26:28 +00:00
lib Update vendor/illumos to illumos-gate revision 13750:6c5d0718e821 2012-07-13 08:02:58 +00:00
libexec Ensure that for the object which is a dependency for some filtee, 2012-06-27 20:24:25 +00:00
release Automatically generate hardware notes for bwn(4). 2012-06-28 10:21:25 +00:00
rescue Disable jail support in ifconfig when either building a rescue 2012-02-14 07:14:42 +00:00
sbin Document the behavior of mount with failok specified. 2012-07-12 15:20:20 +00:00
secure Sort ASM definitions by crypto module for slightly easier maintenance. 2012-07-12 21:31:53 +00:00
share Change language in WITH_BSDCONFIG to match other options, and regen 2012-07-14 10:17:47 +00:00
sys These were never used, remove them. 2012-07-15 06:08:11 +00:00
tools sh: Expand assignment-like words specially for export/readonly/local. 2012-07-15 10:19:43 +00:00
usr.bin Fix spelling 2012-07-07 17:05:55 +00:00
usr.sbin Make pkg bootstrap program ask for confirmation before proceeding. 2012-07-15 04:15:27 +00:00
COPYRIGHT Happy 2012 to FreeBSD users in Samoa. 2011-12-31 04:38:04 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add isci(4) driver for amd64 and i386 targets. 2012-01-31 19:38:18 +00:00
Makefile Import OpenSSL 1.0.1c. 2012-07-11 23:31:36 +00:00
Makefile.inc1 Add "hier" as an alternate spelling of "hierarchy" to match hier(9). 2012-07-03 06:41:00 +00:00
ObsoleteFiles.inc Fix the previous commit. Obsolete libraries must be added to OLD_LIBS. 2012-07-12 23:11:30 +00:00
README Import OpenSSL 1.0.1c. 2012-07-11 23:31:36 +00:00
UPDATING Merge OpenSSL 1.0.1c. 2012-07-12 19:30:53 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html