mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-06 03:40:50 +02:00
commit bash-20140207 snapshot
This commit is contained in:
@@ -790,8 +790,8 @@ j. New user-settable variable, show-mode-in-prompt, adds a characters to the
|
||||
beginning of the prompt indicating the current editing mode.
|
||||
|
||||
k. New application-settable variable: rl_input_available_hook; function to be
|
||||
called when readline detects there is data available on its input file
|
||||
descriptor.
|
||||
called when readline needs to check whether there is data available on its
|
||||
input source. The default hook checks rl_instream.
|
||||
|
||||
l. Readline calls an application-set event hook (rl_signal_event_hook) after
|
||||
it gets a signal while reading input (read returns -1/EINTR but readline
|
||||
|
||||
+2
-2
@@ -791,8 +791,8 @@ j. New user-settable variable, show-mode-in-prompt, adds a characters to the
|
||||
beginning of the prompt indicating the current editing mode.
|
||||
|
||||
k. New application-settable variable: rl_input_available_hook; function to be
|
||||
called when readline detects there is data available on its input file
|
||||
descriptor.
|
||||
called when readline needs to check whether there is data available on its
|
||||
input source. The default hook checks rl_instream.
|
||||
|
||||
l. Readline calls an application-set event hook (rl_signal_event_hook) after
|
||||
it gets a signal while reading input (read returns -1/EINTR but readline
|
||||
|
||||
@@ -5779,3 +5779,44 @@ doc/{bash.1,bashref.texi}
|
||||
- added slight clarifying language to the description of $*,
|
||||
describing what happens when the expansion is not within double
|
||||
quotes
|
||||
|
||||
2/4
|
||||
---
|
||||
test.c
|
||||
- unary_test: add code to -v case so that it interprets `bare' array
|
||||
references (foo[1]) and returns true if that index has a value
|
||||
|
||||
2/5
|
||||
---
|
||||
trap.c
|
||||
- restore_default_signal: fix SIGCHLD special case for SIG_TRAPPED flag
|
||||
off but SIG_INPROGRESS mode set and handler IMPOSSIBLE_TRAP_HANDLER;
|
||||
continue with resetting handler in this case. maybe_set_sigchld_trap
|
||||
will check these things before resetting sigchld trap from
|
||||
run_sigchld_trap. Fixes (apparently long-standing?) problem reported
|
||||
by Alexandru Damian <alexandru.damian@intel.com>
|
||||
|
||||
2/6
|
||||
---
|
||||
lib/sh/strtrans.c
|
||||
- ansic_quote: fixed a bug when copying a printable character that
|
||||
consumes more than one byte; byte counter was not being incremented.
|
||||
Bug report from jidanni@jidanni.org
|
||||
|
||||
2/7
|
||||
---
|
||||
input.c
|
||||
- getc_with_restart: if read(2) returns -1/EINTR and interrupt_state or
|
||||
terminating_signal is set (which means QUIT; will longjmp out of this
|
||||
function), make sure the local buffer variables are zeroed out to
|
||||
avoid reading past the end of the buffer on the next call. Bug report
|
||||
from Dan Jacobson <jidanni@jidanni.org>
|
||||
|
||||
2/9
|
||||
---
|
||||
bashline.c
|
||||
- command_word_completion_function: if a directory in $PATH contains
|
||||
quote characters, we need to quote them before passing the candidate
|
||||
path to rl_filename_completion_function, which performs dequoting on
|
||||
the pathname it's passed. Fixes bug reported by Ilyushkin Nikita
|
||||
<ilyushkeane@gmail.com>
|
||||
|
||||
+5813
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
Starting bash with the `--posix' command-line option or executing
|
||||
`set -o posix' while bash is running will cause bash to conform more
|
||||
closely to the Posix.2 standard by changing the behavior to match that
|
||||
specified by Posix.2 in areas where the bash default differs.
|
||||
|
||||
The following list is what's changed when `posix mode' is in effect:
|
||||
|
||||
1. When a command in the hash table no longer exists, bash will re-search
|
||||
$PATH to find the new location. This is also available with
|
||||
`shopt -s checkhash'.
|
||||
|
||||
2. The >& redirection does not redirect stdout and stderr.
|
||||
|
||||
3. The message printed by the job control code and builtins when a job
|
||||
exits with a non-zero status is `Done(status)'.
|
||||
|
||||
4. Reserved words may not be aliased.
|
||||
|
||||
5. The Posix.2 PS1 and PS2 expansions of `!' -> history number and
|
||||
`!!' -> `!' are enabled, and parameter expansion is performed on
|
||||
the value regardless of the setting of the `promptvars' option.
|
||||
|
||||
6. Interactive comments are enabled by default. (Note that bash has
|
||||
them on by default anyway.)
|
||||
|
||||
7. The Posix.2 startup files are executed ($ENV) rather than the normal
|
||||
bash files.
|
||||
|
||||
8. Tilde expansion is only performed on assignments preceding a command
|
||||
name, rather than on all assignment statements on the line.
|
||||
|
||||
9. The default history file is ~/.sh_history (default value of $HISTFILE).
|
||||
|
||||
10. The output of `kill -l' prints all the signal names on a single line,
|
||||
separated by spaces.
|
||||
|
||||
11. Non-interactive shells exit if `file' in `. file' is not found.
|
||||
|
||||
12. Redirection operators do not perform pathname expansion on the word
|
||||
in the redirection unless the shell is interactive
|
||||
|
||||
13. Function names must be valid shell identifiers. That is, they may not
|
||||
contain characters other than letters, digits, and underscores, and
|
||||
may not start with a digit. Declaring a function with an illegal name
|
||||
causes a fatal syntax error in non-interactive shells.
|
||||
|
||||
14. Posix.2 `special' builtins are found before shell functions during command
|
||||
lookup.
|
||||
|
||||
15. If a Posix.2 special builtin returns an error status, a non-interactive
|
||||
shell exits. The fatal errors are those listed in the POSIX.2 standard,
|
||||
and include things like passing incorrect options, redirection errors,
|
||||
variable assignment errors for assignments preceding the command name,
|
||||
and so on.
|
||||
|
||||
16. The environment passed to executed commands is not sorted. Neither is
|
||||
the output of `set'. This is not strictly Posix.2 behavior, but sh
|
||||
does it this way. Ksh does not. It's not necessary to sort the
|
||||
environment; no program should rely on it being sorted.
|
||||
|
||||
17. If the `cd' builtin finds a directory to change to using $CDPATH, the
|
||||
value it assigns to $PWD does not contain any symbolic links, as if
|
||||
`cd -P' had been executed.
|
||||
|
||||
18. A non-interactive shell exits with an error status if a variable
|
||||
assignment error occurs when no command name follows the assignment
|
||||
statements. A variable assignment error occurs, for example, when
|
||||
trying to assign a value to a read-only variable.
|
||||
|
||||
19. A non-interactive shell exits with an error status if the iteration
|
||||
variable in a for statement or the selection variable in a select
|
||||
statement is a read-only variable.
|
||||
|
||||
20. Process substitution is not available.
|
||||
|
||||
21. Assignment statements preceding POSIX.2 `special' builtins persist in
|
||||
the shell environment after the builtin completes.
|
||||
|
||||
There is other Posix.2 behavior that bash does not implement. Specifically:
|
||||
|
||||
1. Assignment statements affect the execution environment of all builtins,
|
||||
not just special ones.
|
||||
@@ -0,0 +1,544 @@
|
||||
This file is set.def, from which is created set.c.
|
||||
It implements the "set" and "unset" builtins in Bash.
|
||||
|
||||
Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 1, or (at your option) any later
|
||||
version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with Bash; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$PRODUCES set.c
|
||||
|
||||
#include <stdio.h>
|
||||
#include "../shell.h"
|
||||
#include "../flags.h"
|
||||
|
||||
#include "bashgetopt.h"
|
||||
|
||||
extern int interactive;
|
||||
extern int noclobber, posixly_correct;
|
||||
#if defined (READLINE)
|
||||
extern int rl_editing_mode, no_line_editing;
|
||||
#endif /* READLINE */
|
||||
|
||||
$BUILTIN set
|
||||
$FUNCTION set_builtin
|
||||
$SHORT_DOC set [--abefhkmnptuvxldBCHP] [-o option] [arg ...]
|
||||
-a Mark variables which are modified or created for export.
|
||||
-b Notify of job termination immediately.
|
||||
-e Exit immediately if a command exits with a non-zero status.
|
||||
-f Disable file name generation (globbing).
|
||||
-h Locate and remember function commands as functions are
|
||||
defined. Function commands are normally looked up when
|
||||
the function is executed.
|
||||
-i Force the shell to be an "interactive" one. Interactive shells
|
||||
always read `~/.bashrc' on startup.
|
||||
-k All keyword arguments are placed in the environment for a
|
||||
command, not just those that precede the command name.
|
||||
-m Job control is enabled.
|
||||
-n Read commands but do not execute them.
|
||||
-o option-name
|
||||
Set the variable corresponding to option-name:
|
||||
allexport same as -a
|
||||
braceexpand same as -B
|
||||
#if defined (READLINE)
|
||||
emacs use an emacs-style line editing interface
|
||||
#endif /* READLINE */
|
||||
errexit same as -e
|
||||
histexpand same as -H
|
||||
ignoreeof the shell will not exit upon reading EOF
|
||||
interactive-comments
|
||||
allow comments to appear in interactive commands
|
||||
monitor same as -m
|
||||
noclobber disallow redirection to existing files
|
||||
noexec same as -n
|
||||
noglob same as -f
|
||||
nohash same as -d
|
||||
notify save as -b
|
||||
nounset same as -u
|
||||
physical same as -P
|
||||
posix change the behavior of bash where the default
|
||||
operation differs from the 1003.2 standard to
|
||||
match the standard
|
||||
privileged same as -p
|
||||
verbose same as -v
|
||||
#if defined (READLINE)
|
||||
vi use a vi-style line editing interface
|
||||
#endif /* READLINE */
|
||||
xtrace same as -x
|
||||
-p Turned on whenever the real and effective user ids do not match.
|
||||
Disables processing of the $ENV file and importing of shell
|
||||
functions. Turning this option off causes the effective uid and
|
||||
gid to be set to the real uid and gid.
|
||||
-t Exit after reading and executing one command.
|
||||
-u Treat unset variables as an error when substituting.
|
||||
-v Print shell input lines as they are read.
|
||||
-x Print commands and their arguments as they are executed.
|
||||
-l Save and restore the binding of the NAME in a FOR command.
|
||||
-d Disable the hashing of commands that are looked up for execution.
|
||||
Normally, commands are remembered in a hash table, and once
|
||||
found, do not have to be looked up again.
|
||||
#if defined (BRACE_EXPANSION)
|
||||
-B the shell will perform brace expansion
|
||||
#endif /* BRACE_EXPANSION */
|
||||
#if defined (BANG_HISTORY)
|
||||
-H Enable ! style history substitution. This flag is on
|
||||
by default.
|
||||
#endif /* BANG_HISTORY */
|
||||
-C If set, disallow existing regular files to be overwritten
|
||||
by redirection of output.
|
||||
-P If set, do not follow symbolic links when executing commands
|
||||
such as cd which change the current directory.
|
||||
|
||||
Using + rather than - causes these flags to be turned off. The
|
||||
flags can also be used upon invocation of the shell. The current
|
||||
set of flags may be found in $-. The remaining n ARGs are positional
|
||||
parameters and are assigned, in order, to $1, $2, .. $n. If no
|
||||
ARGs are given, all shell variables are printed.
|
||||
$END
|
||||
|
||||
/* An a-list used to match long options for set -o to the corresponding
|
||||
option letter. */
|
||||
struct {
|
||||
char *name;
|
||||
int letter;
|
||||
} o_options[] = {
|
||||
{ "allexport", 'a' },
|
||||
#if defined (BRACE_EXPANSION)
|
||||
{ "braceexpand",'B' },
|
||||
#endif
|
||||
{ "errexit", 'e' },
|
||||
{ "histexpand", 'H' },
|
||||
{ "monitor", 'm' },
|
||||
{ "noexec", 'n' },
|
||||
{ "noglob", 'f' },
|
||||
{ "nohash", 'd' },
|
||||
#if defined (JOB_CONTROL)
|
||||
{ "notify", 'b' },
|
||||
#endif /* JOB_CONTROL */
|
||||
{"nounset", 'u' },
|
||||
{"physical", 'P' },
|
||||
{"privileged", 'p' },
|
||||
{"verbose", 'v' },
|
||||
{"xtrace", 'x' },
|
||||
{(char *)NULL, 0},
|
||||
};
|
||||
|
||||
#define MINUS_O_FORMAT "%-15s\t%s\n"
|
||||
|
||||
void
|
||||
list_minus_o_opts ()
|
||||
{
|
||||
register int i;
|
||||
char *on = "on", *off = "off";
|
||||
|
||||
printf (MINUS_O_FORMAT, "noclobber", (noclobber == 1) ? on : off);
|
||||
|
||||
if (find_variable ("ignoreeof") || find_variable ("IGNOREEOF"))
|
||||
printf (MINUS_O_FORMAT, "ignoreeof", on);
|
||||
else
|
||||
printf (MINUS_O_FORMAT, "ignoreeof", off);
|
||||
|
||||
printf (MINUS_O_FORMAT, "interactive-comments",
|
||||
interactive_comments ? on : off);
|
||||
|
||||
printf (MINUS_O_FORMAT, "posix", posixly_correct ? on : off);
|
||||
|
||||
#if defined (READLINE)
|
||||
if (no_line_editing)
|
||||
{
|
||||
printf (MINUS_O_FORMAT, "emacs", off);
|
||||
printf (MINUS_O_FORMAT, "vi", off);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Magic. This code `knows' how readline handles rl_editing_mode. */
|
||||
printf (MINUS_O_FORMAT, "emacs", (rl_editing_mode == 1) ? on : off);
|
||||
printf (MINUS_O_FORMAT, "vi", (rl_editing_mode == 0) ? on : off);
|
||||
}
|
||||
#endif /* READLINE */
|
||||
|
||||
for (i = 0; o_options[i].name; i++)
|
||||
{
|
||||
int *on_or_off, zero = 0;
|
||||
|
||||
on_or_off = find_flag (o_options[i].letter);
|
||||
if (on_or_off == FLAG_UNKNOWN)
|
||||
on_or_off = &zero;
|
||||
printf (MINUS_O_FORMAT, o_options[i].name, (*on_or_off == 1) ? on : off);
|
||||
}
|
||||
}
|
||||
|
||||
set_minus_o_option (on_or_off, option_name)
|
||||
int on_or_off;
|
||||
char *option_name;
|
||||
{
|
||||
int option_char = -1;
|
||||
|
||||
if (STREQ (option_name, "noclobber"))
|
||||
{
|
||||
if (on_or_off == FLAG_ON)
|
||||
bind_variable ("noclobber", "");
|
||||
else
|
||||
unbind_variable ("noclobber");
|
||||
stupidly_hack_special_variables ("noclobber");
|
||||
}
|
||||
else if (STREQ (option_name, "ignoreeof"))
|
||||
{
|
||||
unbind_variable ("ignoreeof");
|
||||
unbind_variable ("IGNOREEOF");
|
||||
if (on_or_off == FLAG_ON)
|
||||
bind_variable ("IGNOREEOF", "10");
|
||||
stupidly_hack_special_variables ("IGNOREEOF");
|
||||
}
|
||||
|
||||
#if defined (READLINE)
|
||||
else if ((STREQ (option_name, "emacs")) || (STREQ (option_name, "vi")))
|
||||
{
|
||||
if (on_or_off == FLAG_ON)
|
||||
{
|
||||
rl_variable_bind ("editing-mode", option_name);
|
||||
|
||||
if (interactive)
|
||||
with_input_from_stdin ();
|
||||
no_line_editing = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int isemacs = (rl_editing_mode == 1);
|
||||
if ((isemacs && STREQ (option_name, "emacs")) ||
|
||||
(!isemacs && STREQ (option_name, "vi")))
|
||||
{
|
||||
if (interactive)
|
||||
with_input_from_stream (stdin, "stdin");
|
||||
no_line_editing = 1;
|
||||
}
|
||||
else
|
||||
builtin_error ("not in %s editing mode", option_name);
|
||||
}
|
||||
}
|
||||
#endif /* READLINE */
|
||||
else if (STREQ (option_name, "interactive-comments"))
|
||||
interactive_comments = (on_or_off == FLAG_ON);
|
||||
else if (STREQ (option_name, "posix"))
|
||||
{
|
||||
posixly_correct = (on_or_off == FLAG_ON);
|
||||
unbind_variable ("POSIXLY_CORRECT");
|
||||
unbind_variable ("POSIX_PEDANTIC");
|
||||
if (on_or_off == FLAG_ON)
|
||||
{
|
||||
bind_variable ("POSIXLY_CORRECT", "");
|
||||
stupidly_hack_special_variables ("POSIXLY_CORRECT");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
register int i;
|
||||
for (i = 0; o_options[i].name; i++)
|
||||
{
|
||||
if (STREQ (option_name, o_options[i].name))
|
||||
{
|
||||
option_char = o_options[i].letter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (option_char == -1)
|
||||
{
|
||||
builtin_error ("%s: unknown option name", option_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
if (change_flag (option_char, on_or_off) == FLAG_ERROR)
|
||||
{
|
||||
bad_option (option_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
}
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
/* Set some flags from the word values in the input list. If LIST is empty,
|
||||
then print out the values of the variables instead. If LIST contains
|
||||
non-flags, then set $1 - $9 to the successive words of LIST. */
|
||||
set_builtin (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
int on_or_off, flag_name, force_assignment = 0;
|
||||
|
||||
if (!list)
|
||||
{
|
||||
SHELL_VAR **vars;
|
||||
|
||||
vars = all_shell_variables ();
|
||||
if (vars)
|
||||
{
|
||||
print_var_list (vars);
|
||||
free (vars);
|
||||
}
|
||||
|
||||
vars = all_shell_functions ();
|
||||
if (vars)
|
||||
{
|
||||
print_var_list (vars);
|
||||
free (vars);
|
||||
}
|
||||
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
/* Check validity of flag arguments. */
|
||||
if (*list->word->word == '-' || *list->word->word == '+')
|
||||
{
|
||||
register char *arg;
|
||||
WORD_LIST *save_list = list;
|
||||
|
||||
while (list && (arg = list->word->word))
|
||||
{
|
||||
char c;
|
||||
|
||||
if (arg[0] != '-' && arg[0] != '+')
|
||||
break;
|
||||
|
||||
/* `-' or `--' signifies end of flag arguments. */
|
||||
if (arg[0] == '-' &&
|
||||
(!arg[1] || (arg[1] == '-' && !arg[2])))
|
||||
break;
|
||||
|
||||
while (c = *++arg)
|
||||
{
|
||||
if (find_flag (c) == FLAG_UNKNOWN && c != 'o')
|
||||
{
|
||||
char s[2];
|
||||
s[0] = c; s[1] = '\0';
|
||||
bad_option (s);
|
||||
if (c == '?')
|
||||
builtin_usage ();
|
||||
return (c == '?' ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
|
||||
}
|
||||
}
|
||||
list = list->next;
|
||||
}
|
||||
list = save_list;
|
||||
}
|
||||
|
||||
/* Do the set command. While the list consists of words starting with
|
||||
'-' or '+' treat them as flags, otherwise, start assigning them to
|
||||
$1 ... $n. */
|
||||
while (list)
|
||||
{
|
||||
char *string = list->word->word;
|
||||
|
||||
/* If the argument is `--' or `-' then signal the end of the list
|
||||
and remember the remaining arguments. */
|
||||
if (string[0] == '-' && (!string[1] || (string[1] == '-' && !string[2])))
|
||||
{
|
||||
list = list->next;
|
||||
|
||||
/* `set --' unsets the positional parameters. */
|
||||
if (string[1] == '-')
|
||||
force_assignment = 1;
|
||||
|
||||
/* Until told differently, the old shell behaviour of
|
||||
`set - [arg ...]' being equivalent to `set +xv [arg ...]'
|
||||
stands. Posix.2 says the behaviour is marked as obsolescent. */
|
||||
else
|
||||
{
|
||||
change_flag ('x', '+');
|
||||
change_flag ('v', '+');
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ((on_or_off = *string) &&
|
||||
(on_or_off == '-' || on_or_off == '+'))
|
||||
{
|
||||
int i = 1;
|
||||
while (flag_name = string[i++])
|
||||
{
|
||||
if (flag_name == '?')
|
||||
{
|
||||
builtin_usage ();
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
else if (flag_name == 'o') /* -+o option-name */
|
||||
{
|
||||
char *option_name;
|
||||
WORD_LIST *opt;
|
||||
|
||||
opt = list->next;
|
||||
|
||||
if (!opt)
|
||||
{
|
||||
list_minus_o_opts ();
|
||||
continue;
|
||||
}
|
||||
|
||||
option_name = opt->word->word;
|
||||
|
||||
if (!option_name || !*option_name || (*option_name == '-'))
|
||||
{
|
||||
list_minus_o_opts ();
|
||||
continue;
|
||||
}
|
||||
list = list->next; /* Skip over option name. */
|
||||
|
||||
if (set_minus_o_option (on_or_off, option_name) != EXECUTION_SUCCESS)
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (change_flag (flag_name, on_or_off) == FLAG_ERROR)
|
||||
{
|
||||
char opt[3];
|
||||
opt[0] = on_or_off;
|
||||
opt[1] = flag_name;
|
||||
opt[2] = '\0';
|
||||
bad_option (opt);
|
||||
builtin_usage ();
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
/* Assigning $1 ... $n */
|
||||
if (list || force_assignment)
|
||||
remember_args (list, 1);
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
$BUILTIN unset
|
||||
$FUNCTION unset_builtin
|
||||
$SHORT_DOC unset [-f] [-v] [name ...]
|
||||
For each NAME, remove the corresponding variable or function. Given
|
||||
the `-v', unset will only act on variables. Given the `-f' flag,
|
||||
unset will only act on functions. With neither flag, unset first
|
||||
tries to unset a variable, and if that fails, then tries to unset a
|
||||
function. Some variables (such as PATH and IFS) cannot be unset; also
|
||||
see readonly.
|
||||
$END
|
||||
|
||||
#define NEXT_VARIABLE() any_failed++; list = list->next; continue;
|
||||
|
||||
unset_builtin (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
int unset_function, unset_variable, unset_array, opt, any_failed;
|
||||
char *name;
|
||||
|
||||
unset_function = unset_variable = unset_array = any_failed = 0;
|
||||
|
||||
reset_internal_getopt ();
|
||||
while ((opt = internal_getopt (list, "fv")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'f':
|
||||
unset_function = 1;
|
||||
break;
|
||||
case 'v':
|
||||
unset_variable = 1;
|
||||
break;
|
||||
default:
|
||||
builtin_usage ();
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
list = loptend;
|
||||
|
||||
if (unset_function && unset_variable)
|
||||
{
|
||||
builtin_error ("cannot simultaneously unset a function and a variable");
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
while (list)
|
||||
{
|
||||
SHELL_VAR *var;
|
||||
int tem;
|
||||
#if defined (ARRAY_VARS)
|
||||
char *t;
|
||||
#endif
|
||||
|
||||
name = list->word->word;
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
if (!unset_function && valid_array_reference (name))
|
||||
{
|
||||
t = strchr (name, '[');
|
||||
*t++ = '\0';
|
||||
unset_array++;
|
||||
}
|
||||
#endif
|
||||
|
||||
var = unset_function ? find_function (name) : find_variable (name);
|
||||
|
||||
if (var && !unset_function && non_unsettable_p (var))
|
||||
{
|
||||
builtin_error ("%s: cannot unset", name);
|
||||
NEXT_VARIABLE ();
|
||||
}
|
||||
|
||||
/* Posix.2 says that unsetting readonly variables is an error. */
|
||||
if (var && readonly_p (var))
|
||||
{
|
||||
builtin_error ("%s: cannot unset: readonly %s",
|
||||
name, unset_function ? "function" : "variable");
|
||||
NEXT_VARIABLE ();
|
||||
}
|
||||
|
||||
/* Unless the -f option is supplied, the name refers to a variable. */
|
||||
#if defined (ARRAY_VARS)
|
||||
if (var && unset_array)
|
||||
{
|
||||
if (array_p (var) == 0)
|
||||
{
|
||||
builtin_error ("%s: not an array variable", name);
|
||||
NEXT_VARIABLE ();
|
||||
}
|
||||
else
|
||||
tem = unbind_array_element (var, t);
|
||||
}
|
||||
else
|
||||
#endif /* ARRAY_VARS */
|
||||
tem = makunbound (name, unset_function ? shell_functions : shell_variables);
|
||||
|
||||
/* This is what Posix.2 draft 11+ says. ``If neither -f nor -v
|
||||
is specified, the name refers to a variable; if a variable by
|
||||
that name does not exist, a function by that name, if any,
|
||||
shall be unset.'' */
|
||||
if ((tem == -1) && !unset_function && !unset_variable)
|
||||
tem = makunbound (name, shell_functions);
|
||||
|
||||
if (tem == -1)
|
||||
any_failed++;
|
||||
else if (!unset_function)
|
||||
stupidly_hack_special_variables (name);
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
if (any_failed)
|
||||
return (EXECUTION_FAILURE);
|
||||
else
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/* unwind_prot.h - Macros and functions for hacking unwind protection. */
|
||||
|
||||
/* Copyright (C) 1993 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2, or (at your option) any later
|
||||
version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with Bash; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#if !defined (_UNWIND_PROT_H)
|
||||
#define _UNWIND_PROT_H
|
||||
|
||||
/* Run a function without interrupts. */
|
||||
extern void begin_unwind_frame ();
|
||||
extern void discard_unwind_frame ();
|
||||
extern void run_unwind_frame ();
|
||||
extern void add_unwind_protect ();
|
||||
extern void remove_unwind_protect ();
|
||||
extern void run_unwind_protects ();
|
||||
extern void unwind_protect_var ();
|
||||
|
||||
/* Define for people who like their code to look a certain way. */
|
||||
#define end_unwind_frame()
|
||||
|
||||
/* How to protect an integer. */
|
||||
#define unwind_protect_int(X) unwind_protect_var (&(X), (char *)(X), sizeof (int))
|
||||
|
||||
/* How to protect a pointer to a string. */
|
||||
#define unwind_protect_string(X) \
|
||||
unwind_protect_var ((int *)&(X), (X), sizeof (char *))
|
||||
|
||||
/* How to protect any old pointer. */
|
||||
#define unwind_protect_pointer(X) unwind_protect_string (X)
|
||||
|
||||
/* How to protect the contents of a jmp_buf. */
|
||||
#define unwind_protect_jmp_buf(X) \
|
||||
unwind_protect_var ((int *)(X), (char *)(X), sizeof (procenv_t))
|
||||
|
||||
#endif /* _UNWIND_PROT_H */
|
||||
@@ -805,6 +805,7 @@ tests/array12.sub f
|
||||
tests/array13.sub f
|
||||
tests/array14.sub f
|
||||
tests/array15.sub f
|
||||
tests/array16.sub f
|
||||
tests/array-at-star f
|
||||
tests/array2.right f
|
||||
tests/assoc.tests f
|
||||
|
||||
+13
-2
@@ -1720,6 +1720,7 @@ command_word_completion_function (hint_text, state)
|
||||
static char *path = (char *)NULL;
|
||||
static char *val = (char *)NULL;
|
||||
static char *filename_hint = (char *)NULL;
|
||||
static char *fnhint = (char *)NULL;
|
||||
static char *dequoted_hint = (char *)NULL;
|
||||
static char *directory_part = (char *)NULL;
|
||||
static char **glob_matches = (char **)NULL;
|
||||
@@ -1799,7 +1800,7 @@ command_word_completion_function (hint_text, state)
|
||||
if (filename_hint)
|
||||
free (filename_hint);
|
||||
|
||||
filename_hint = savestring (hint);
|
||||
fnhint = filename_hint = savestring (hint);
|
||||
|
||||
istate = 0;
|
||||
|
||||
@@ -2007,15 +2008,25 @@ globword:
|
||||
if (current_path[0] == '.' && current_path[1] == '\0')
|
||||
dot_in_path = 1;
|
||||
|
||||
if (fnhint && fnhint != filename_hint)
|
||||
free (fnhint);
|
||||
if (filename_hint)
|
||||
free (filename_hint);
|
||||
|
||||
filename_hint = sh_makepath (current_path, hint, 0);
|
||||
/* Need a quoted version (though it doesn't matter much in most
|
||||
cases) because rl_filename_completion_function dequotes the
|
||||
filename it gets, assuming that it's been quoted as part of
|
||||
the input line buffer. */
|
||||
if (strpbrk (filename_hint, "\"'\\"))
|
||||
fnhint = sh_backslash_quote (filename_hint, filename_bstab, 0);
|
||||
else
|
||||
fnhint = filename_hint;
|
||||
free (current_path); /* XXX */
|
||||
}
|
||||
|
||||
inner:
|
||||
val = rl_filename_completion_function (filename_hint, istate);
|
||||
val = rl_filename_completion_function (fnhint, istate);
|
||||
if (mapping_over == 4 && dircomplete_expand)
|
||||
set_directory_hook ();
|
||||
|
||||
|
||||
+4211
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests for CYGWIN32 so they don't need to be done when cross-compiling.
|
||||
|
||||
# AC_FUNC_GETPGRP should also define GETPGRP_VOID
|
||||
ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'}
|
||||
# AC_FUNC_SETVBUF_REVERSED should not define anything else
|
||||
ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'}
|
||||
# on CYGWIN32, system calls do not restart
|
||||
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
|
||||
bash_cv_sys_restartable_syscalls=${bash_cv_sys_restartable_syscalls='no'}
|
||||
|
||||
# these may be necessary, but they are currently commented out
|
||||
#ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
|
||||
ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int='4'}
|
||||
ac_cv_sizeof_long=${ac_cv_sizeof_long='4'}
|
||||
ac_cv_sizeof_double=${ac_cv_sizeof_double='8'}
|
||||
|
||||
bash_cv_dup2_broken=${bash_cv_dup2_broken='no'}
|
||||
bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'}
|
||||
bash_cv_type_rlimit=${bash_cv_type_rlimit='long'}
|
||||
bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'}
|
||||
bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'}
|
||||
bash_cv_sys_siglist=${bash_cv_sys_siglist='no'}
|
||||
bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'}
|
||||
bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'}
|
||||
bash_cv_printf_declared=${bash_cv_printf_declared='yes'}
|
||||
bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'}
|
||||
bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen='no'}
|
||||
bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'}
|
||||
bash_cv_job_control_missing=${bash_cv_job_control_missing='present'}
|
||||
bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='missing'}
|
||||
bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='missing'}
|
||||
bash_cv_mail_dir=${bash_cv_mail_dir='unknown'}
|
||||
bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'}
|
||||
|
||||
bash_cv_type_int32_t=${bash_cv_type_int32_t='int'}
|
||||
bash_cv_type_u_int32_t=${bash_cv_type_u_int32_t='int'}
|
||||
|
||||
ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'}
|
||||
|
||||
# end of cross-build/cygwin32.cache
|
||||
+1745
File diff suppressed because it is too large
Load Diff
+12
-9
@@ -468,7 +468,7 @@ SSHHEELLLL GGRRAAMMMMAARR
|
||||
status is zero if no pattern matches. Otherwise, it is the exit
|
||||
status of the last command executed in _l_i_s_t.
|
||||
|
||||
iiff _l_i_s_t; tthheenn _l_i_s_t_; [ eelliiff _l_i_s_t; tthheenn _l_i_s_t; ] ... [ eellssee _l_i_s_t; ] ffii
|
||||
iiff _l_i_s_t; tthheenn _l_i_s_t; [ eelliiff _l_i_s_t; tthheenn _l_i_s_t; ] ... [ eellssee _l_i_s_t; ] ffii
|
||||
The iiff _l_i_s_t is executed. If its exit status is zero, the tthheenn
|
||||
_l_i_s_t is executed. Otherwise, each eelliiff _l_i_s_t is executed in
|
||||
turn, and if its exit status is zero, the corresponding tthheenn
|
||||
@@ -706,13 +706,16 @@ PPAARRAAMMEETTEERRSS
|
||||
The shell treats several parameters specially. These parameters may
|
||||
only be referenced; assignment to them is not allowed.
|
||||
** Expands to the positional parameters, starting from one. When
|
||||
the expansion occurs within double quotes, it expands to a sin-
|
||||
gle word with the value of each parameter separated by the first
|
||||
character of the IIFFSS special variable. That is, "$$**" is equiva-
|
||||
lent to "$$11_c$$22_c......", where _c is the first character of the value
|
||||
of the IIFFSS variable. If IIFFSS is unset, the parameters are sepa-
|
||||
rated by spaces. If IIFFSS is null, the parameters are joined
|
||||
without intervening separators.
|
||||
the expansion is not within double quotes, each positional
|
||||
parameter expands to a separate word. In contexts where it is
|
||||
performed, those words are subject to further word splitting and
|
||||
pathname expansion. When the expansion occurs within double
|
||||
quotes, it expands to a single word with the value of each
|
||||
parameter separated by the first character of the IIFFSS special
|
||||
variable. That is, "$$**" is equivalent to "$$11_c$$22_c......", where _c
|
||||
is the first character of the value of the IIFFSS variable. If IIFFSS
|
||||
is unset, the parameters are separated by spaces. If IIFFSS is
|
||||
null, the parameters are joined without intervening separators.
|
||||
@@ Expands to the positional parameters, starting from one. When
|
||||
the expansion occurs within double quotes, each parameter
|
||||
expands to a separate word. That is, "$$@@" is equivalent to "$$11"
|
||||
@@ -5721,4 +5724,4 @@ BBUUGGSS
|
||||
|
||||
|
||||
|
||||
GNU Bash 4.3 2014 January 6 BASH(1)
|
||||
GNU Bash 4.3 2014 February 2 BASH(1)
|
||||
|
||||
@@ -7526,6 +7526,9 @@ command,
|
||||
unless the \fB\-g\fP option is supplied.
|
||||
If a variable name is followed by =\fIvalue\fP, the value of
|
||||
the variable is set to \fIvalue\fP.
|
||||
When using \fB\-a\fP or \fB\-A\fP and the compound assignment syntax to
|
||||
create array variables, additional attributes do not take effect until
|
||||
subsequent assignments.
|
||||
The return value is 0 unless an invalid option is encountered,
|
||||
an attempt is made to define a function using
|
||||
.if n ``\-f foo=bar'',
|
||||
|
||||
+10
-6
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2014 January 6<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2014 February 2<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -1130,7 +1130,7 @@ on a successful match.
|
||||
The exit status is zero if no
|
||||
pattern matches. Otherwise, it is the exit status of the
|
||||
last command executed in <I>list</I>.
|
||||
<DT><B>if</B> <I>list</I>; <B>then</B> <I>list;</I> [ <B>elif</B> <I>list</I>; <B>then</B> <I>list</I>; ] ... [ <B>else</B> <I>list</I>; ] <B>fi</B><DD>
|
||||
<DT><B>if</B> <I>list</I>; <B>then</B> <I>list</I>; [ <B>elif</B> <I>list</I>; <B>then</B> <I>list</I>; ] ... [ <B>else</B> <I>list</I>; ] <B>fi</B><DD>
|
||||
The
|
||||
<B>if </B>
|
||||
|
||||
@@ -1679,8 +1679,12 @@ only be referenced; assignment to them is not allowed.
|
||||
<DT><B>*</B>
|
||||
|
||||
<DD>
|
||||
Expands to the positional parameters, starting from one. When the
|
||||
expansion occurs within double quotes, it expands to a single word
|
||||
Expands to the positional parameters, starting from one.
|
||||
When the expansion is not within double quotes, each positional parameter
|
||||
expands to a separate word.
|
||||
In contexts where it is performed, those words
|
||||
are subject to further word splitting and pathname expansion.
|
||||
When the expansion occurs within double quotes, it expands to a single word
|
||||
with the value of each parameter separated by the first character
|
||||
of the
|
||||
<FONT SIZE=-1><B>IFS</B>
|
||||
@@ -13157,7 +13161,7 @@ There may be only one active coprocess at a time.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 4.3<TH ALIGN=CENTER width=33%>2014 January 6<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 4.3<TH ALIGN=CENTER width=33%>2014 February 2<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -13263,6 +13267,6 @@ There may be only one active coprocess at a time.
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 23 January 2014 15:52:11 EST
|
||||
Time: 04 February 2014 09:39:07 EST
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
Binary file not shown.
+278
-269
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -81,9 +81,9 @@
|
||||
@xrdef{Positional Parameters-pg}{19}
|
||||
@xrdef{Special Parameters-title}{Special Parameters}
|
||||
@xrdef{Special Parameters-snt}{Section@tie 3.4.2}
|
||||
@xrdef{Special Parameters-pg}{20}
|
||||
@xrdef{Shell Expansions-title}{Shell Expansions}
|
||||
@xrdef{Shell Expansions-snt}{Section@tie 3.5}
|
||||
@xrdef{Special Parameters-pg}{20}
|
||||
@xrdef{Brace Expansion-title}{Brace Expansion}
|
||||
@xrdef{Brace Expansion-snt}{Section@tie 3.5.1}
|
||||
@xrdef{Shell Expansions-pg}{21}
|
||||
@@ -99,18 +99,18 @@
|
||||
@xrdef{Arithmetic Expansion-title}{Arithmetic Expansion}
|
||||
@xrdef{Arithmetic Expansion-snt}{Section@tie 3.5.5}
|
||||
@xrdef{Command Substitution-pg}{28}
|
||||
@xrdef{Arithmetic Expansion-pg}{28}
|
||||
@xrdef{Process Substitution-title}{Process Substitution}
|
||||
@xrdef{Process Substitution-snt}{Section@tie 3.5.6}
|
||||
@xrdef{Word Splitting-title}{Word Splitting}
|
||||
@xrdef{Word Splitting-snt}{Section@tie 3.5.7}
|
||||
@xrdef{Filename Expansion-title}{Filename Expansion}
|
||||
@xrdef{Filename Expansion-snt}{Section@tie 3.5.8}
|
||||
@xrdef{Arithmetic Expansion-pg}{29}
|
||||
@xrdef{Process Substitution-pg}{29}
|
||||
@xrdef{Word Splitting-pg}{29}
|
||||
@xrdef{Filename Expansion-pg}{29}
|
||||
@xrdef{Filename Expansion-title}{Filename Expansion}
|
||||
@xrdef{Filename Expansion-snt}{Section@tie 3.5.8}
|
||||
@xrdef{Pattern Matching-title}{Pattern Matching}
|
||||
@xrdef{Pattern Matching-snt}{Section@tie 3.5.8.1}
|
||||
@xrdef{Filename Expansion-pg}{30}
|
||||
@xrdef{Pattern Matching-pg}{30}
|
||||
@xrdef{Quote Removal-title}{Quote Removal}
|
||||
@xrdef{Quote Removal-snt}{Section@tie 3.5.9}
|
||||
|
||||
+6
-6
@@ -52,14 +52,14 @@
|
||||
\entry{parameter expansion}{23}{parameter expansion}
|
||||
\entry{expansion, parameter}{23}{expansion, parameter}
|
||||
\entry{command substitution}{28}{command substitution}
|
||||
\entry{expansion, arithmetic}{28}{expansion, arithmetic}
|
||||
\entry{arithmetic expansion}{28}{arithmetic expansion}
|
||||
\entry{expansion, arithmetic}{29}{expansion, arithmetic}
|
||||
\entry{arithmetic expansion}{29}{arithmetic expansion}
|
||||
\entry{process substitution}{29}{process substitution}
|
||||
\entry{word splitting}{29}{word splitting}
|
||||
\entry{expansion, filename}{29}{expansion, filename}
|
||||
\entry{expansion, pathname}{29}{expansion, pathname}
|
||||
\entry{filename expansion}{29}{filename expansion}
|
||||
\entry{pathname expansion}{29}{pathname expansion}
|
||||
\entry{expansion, filename}{30}{expansion, filename}
|
||||
\entry{expansion, pathname}{30}{expansion, pathname}
|
||||
\entry{filename expansion}{30}{filename expansion}
|
||||
\entry{pathname expansion}{30}{pathname expansion}
|
||||
\entry{pattern matching}{30}{pattern matching}
|
||||
\entry{matching, pattern}{30}{matching, pattern}
|
||||
\entry{redirection}{31}{redirection}
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
\initial {A}
|
||||
\entry {alias expansion}{88}
|
||||
\entry {arithmetic evaluation}{87}
|
||||
\entry {arithmetic expansion}{28}
|
||||
\entry {arithmetic expansion}{29}
|
||||
\entry {arithmetic, shell}{87}
|
||||
\entry {arrays}{89}
|
||||
\initial {B}
|
||||
@@ -42,18 +42,18 @@
|
||||
\entry {execution environment}{36}
|
||||
\entry {exit status}{3, 38}
|
||||
\entry {expansion}{21}
|
||||
\entry {expansion, arithmetic}{28}
|
||||
\entry {expansion, arithmetic}{29}
|
||||
\entry {expansion, brace}{21}
|
||||
\entry {expansion, filename}{29}
|
||||
\entry {expansion, filename}{30}
|
||||
\entry {expansion, parameter}{23}
|
||||
\entry {expansion, pathname}{29}
|
||||
\entry {expansion, pathname}{30}
|
||||
\entry {expansion, tilde}{22}
|
||||
\entry {expressions, arithmetic}{87}
|
||||
\entry {expressions, conditional}{85}
|
||||
\initial {F}
|
||||
\entry {field}{3}
|
||||
\entry {filename}{3}
|
||||
\entry {filename expansion}{29}
|
||||
\entry {filename expansion}{30}
|
||||
\entry {foreground}{97}
|
||||
\entry {functions, shell}{17}
|
||||
\initial {H}
|
||||
@@ -92,7 +92,7 @@
|
||||
\entry {parameters}{18}
|
||||
\entry {parameters, positional}{19}
|
||||
\entry {parameters, special}{20}
|
||||
\entry {pathname expansion}{29}
|
||||
\entry {pathname expansion}{30}
|
||||
\entry {pattern matching}{30}
|
||||
\entry {pipeline}{8}
|
||||
\entry {POSIX}{3}
|
||||
|
||||
Binary file not shown.
+11
-7
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- Created on January, 23 2014 by texi2html 1.64 -->
|
||||
<!-- Created on February, 4 2014 by texi2html 1.64 -->
|
||||
<!--
|
||||
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
||||
Karl Berry <karl@freefriends.org>
|
||||
@@ -33,11 +33,11 @@ Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
|
||||
<H1>Bash Reference Manual</H1></P><P>
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.3, 6 January 2014).
|
||||
the Bash shell (version 4.3, 2 February 2014).
|
||||
The Bash home page is <A HREF="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</A>.
|
||||
</P><P>
|
||||
|
||||
This is Edition 4.3, last updated 6 January 2014,
|
||||
This is Edition 4.3, last updated 2 February 2014,
|
||||
of <CITE>The GNU Bash Reference Manual</CITE>,
|
||||
for <CODE>Bash</CODE>, Version 4.3.
|
||||
</P><P>
|
||||
@@ -2042,8 +2042,12 @@ only be referenced; assignment to them is not allowed.
|
||||
<DT><CODE>*</CODE>
|
||||
<DD><A NAME="IDX47"></A>
|
||||
<A NAME="IDX48"></A>
|
||||
($*) Expands to the positional parameters, starting from one. When the
|
||||
expansion occurs within double quotes, it expands to a single word
|
||||
($*) Expands to the positional parameters, starting from one.
|
||||
When the expansion is not within double quotes, each positional parameter
|
||||
expands to a separate word.
|
||||
In contexts where it is performed, those words
|
||||
are subject to further word splitting and pathname expansion.
|
||||
When the expansion occurs within double quotes, it expands to a single word
|
||||
with the value of each parameter separated by the first character
|
||||
of the <CODE>IFS</CODE>
|
||||
special variable. That is, <CODE>"$*"</CODE> is equivalent
|
||||
@@ -17300,7 +17304,7 @@ to permit their use in free software.
|
||||
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
|
||||
</TR></TABLE>
|
||||
<H1>About this document</H1>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>January, 23 2014</I>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>February, 4 2014</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
<P></P>
|
||||
@@ -17462,7 +17466,7 @@ the following structure:
|
||||
<BR>
|
||||
<FONT SIZE="-1">
|
||||
This document was generated
|
||||
by <I>Chet Ramey</I> on <I>January, 23 2014</I>
|
||||
by <I>Chet Ramey</I> on <I>February, 4 2014</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
|
||||
|
||||
+159
-156
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 4.13 from
|
||||
/usr/homes/chet/src/bash/src/doc/bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.3, 6 January 2014).
|
||||
the Bash shell (version 4.3, 2 February 2014).
|
||||
|
||||
This is Edition 4.3, last updated 6 January 2014, of `The GNU Bash
|
||||
This is Edition 4.3, last updated 2 February 2014, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.3.
|
||||
|
||||
Copyright (C) 1988-2014 Free Software Foundation, Inc.
|
||||
@@ -28,10 +28,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.3, 6 January 2014). The Bash home page is
|
||||
the Bash shell (version 4.3, 2 February 2014). The Bash home page is
|
||||
`http://www.gnu.org/software/bash/'.
|
||||
|
||||
This is Edition 4.3, last updated 6 January 2014, of `The GNU Bash
|
||||
This is Edition 4.3, last updated 2 February 2014, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -1351,13 +1351,16 @@ only be referenced; assignment to them is not allowed.
|
||||
|
||||
`*'
|
||||
($*) Expands to the positional parameters, starting from one.
|
||||
When the expansion occurs within double quotes, it expands to a
|
||||
single word with the value of each parameter separated by the
|
||||
first character of the `IFS' special variable. That is, `"$*"' is
|
||||
equivalent to `"$1C$2C..."', where C is the first character of the
|
||||
value of the `IFS' variable. If `IFS' is unset, the parameters
|
||||
are separated by spaces. If `IFS' is null, the parameters are
|
||||
joined without intervening separators.
|
||||
When the expansion is not within double quotes, each positional
|
||||
parameter expands to a separate word. In contexts where it is
|
||||
performed, those words are subject to further word splitting and
|
||||
pathname expansion. When the expansion occurs within double
|
||||
quotes, it expands to a single word with the value of each
|
||||
parameter separated by the first character of the `IFS' special
|
||||
variable. That is, `"$*"' is equivalent to `"$1C$2C..."', where C
|
||||
is the first character of the value of the `IFS' variable. If
|
||||
`IFS' is unset, the parameters are separated by spaces. If `IFS'
|
||||
is null, the parameters are joined without intervening separators.
|
||||
|
||||
`@'
|
||||
($@) Expands to the positional parameters, starting from one.
|
||||
@@ -10688,24 +10691,24 @@ D.3 Parameter and Variable Index
|
||||
| ||||