argument in calls to iconv, since outlen is used to keep track of
the size of the buffer, and iconv potentially modifies its
`outbytesleft' argument
+
+ 9/29
+ ----
+subst.c
+ - make skip_to_delim understand how to skip over process substitution
+ constructs the way it skips $(...) command substitution
+
+ 9/30
+ ----
+lib/readline/terminal.c
+ - don't set the `terminal has meta key' flag if the `MT' capability is
+ available; that means something completely different
+
+ 10/1
+ ----
+builtins/help.def
+ - make sure width is at least 7, since we pass `width/2 - 3' to strncpy
+ as the length argument. Terminal widths <= 6 are converted to 80.
+ Fixes bug reported by Chris Hall <c@pobox.co.uk>
+
+configure.in
+ - changed version to 4.1-alpha
+
+subst.h
+ - new flag for skip_to_delim: SD_NOSKIPCMD, which means to not skip
+ over embedded command and process substitutions, but rather to look
+ for delimiters within them
+
+subst.c
+ - implement semantics of SD_NOSKIPCMD in skip_to_delim
+
+bashline.c
+ - call skip_to_delim with SD_NOSKIPCMD from find_cmd_start, so
+ programmable completion can use the completion defined for `b' for
+ command lines like "a $(b c". Fixes inconsistency/bug reported by
+ Freddy Vulto <fvulto@gmail.com>
+
+parser.h
+ - replace unused PST_CMDTOKEN parser state value with PST_EXTPAT,
+ means currently parsing an extended glob pattern (extglob)
+
+parse.y
+ - fix cond_node() so that extended_glob is set before parsing the
+ rhs of the `==' or `!=' operators. For ksh93 compatibility.
+ - reset extended_glob to global value (saved in parse_cond_command())
+ in reset_parser()
+
+ 10/5
+ ----
+jobs.c
+ - change waitchld() to only interrupt the wait builtin when the shell
+ receives SIGCHLD in Posix mode. It's a posix requirement, but
+ makes easy things hard to do, like run a SIGCHLD trap for every
+ exiting child. Change prompted by question from Alex Efros
+ <powerman@powerman.name>
+
+doc/bashref.texi
+ - document new posix mode behavior about SIGCHLD arriving while the
+ wait builtin is executing when a trap on SIGCHLD has been set
- add "darwin10" cases like darwin8 and darwin9 to handle linking with
included readline and history libraries
- 9/25
+ 9/26
----
lib/readline/display.c
- modify change of 7/24 to use prompt_physical_chars instead of
argument in calls to iconv, since outlen is used to keep track of
the size of the buffer, and iconv potentially modifies its
`outbytesleft' argument
+
+ 9/29
+ ----
+subst.c
+ - make skip_to_delim understand how to skip over process substitution
+ constructs the way it skips $(...) command substitution
+
+ 9/30
+ ----
+lib/readline/terminal.c
+ - don't set the `terminal has meta key' flag if the `MT' capability is
+ available; that means something completely different
+
+ 10/1
+ ----
+builtins/help.def
+ - make sure width is at least 7, since we pass `width/2 - 3' to strncpy
+ as the length argument. Terminal widths <= 6 are converted to 80.
+ Fixes bug reported by Chris Hall <c@pobox.co.uk>
+
+configure.in
+ - changed version to 4.1-alpha
+
+subst.h
+ - new flag for skip_to_delim: SD_NOSKIPCMD, which means to not skip
+ over embedded command and process substitutions, but rather to look
+ for delimiters within them
+
+subst.c
+ - implement semantics of SD_NOSKIPCMD in skip_to_delim
+
+bashline.c
+ - call skip_to_delim with SD_NOSKIPCMD from find_cmd_start, so
+ programmable completion can use the completion defined for `b' for
+ command lines like "a $(b c". Fixes inconsistency/bug reported by
+ Freddy Vulto <fvulto@gmail.com>
+
+parser.h
+ - replace unused PST_CMDTOKEN parser state value with PST_EXTPAT,
+ means currently parsing an extended glob pattern (extglob)
+
+parse.y
+ - fix cond_node() so that extended_glob is set before parsing the
+ rhs of the `==' or `!=' operators. For ksh93 compatibility.
+ - reset extended_glob to global value (saved in parse_cond_command())
+ in reset_parser()
+
+ 10/5
+ ----
+jobs.c
+ - change waitchld() to only interrupt the wait builtin when the shell
+ receives SIGCHLD in Posix mode. It's a posix requirement, but
+ makes easy things hard to do, like run a SIGCHLD trap for every
+ exiting child
+
+doc/bashref.texi
+ - document new posix mode behavior about SIGCHLD arriving while the
+ wait builtin is executing when a trap on SIGCHLD has been set
@%:@! /bin/sh
-@%:@ From configure.in for Bash 4.0, version 4.014.
+@%:@ From configure.in for Bash 4.1, version 4.015.
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.63 for bash 4.0-maint.
+@%:@ Generated by GNU Autoconf 2.63 for bash 4.1-alpha.
@%:@
@%:@ Report bugs to <bug-bash@gnu.org>.
@%:@
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='4.0-maint'
-PACKAGE_STRING='bash 4.0-maint'
+PACKAGE_VERSION='4.1-alpha'
+PACKAGE_STRING='bash 4.1-alpha'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
ac_unique_file="shell.h"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bash 4.0-maint to adapt to many kinds of systems.
+\`configure' configures bash 4.1-alpha to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bash 4.0-maint:";;
+ short | recursive ) echo "Configuration of bash 4.1-alpha:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bash configure 4.0-maint
+bash configure 4.1-alpha
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bash $as_me 4.0-maint, which was
+It was created by bash $as_me 4.1-alpha, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
ac_config_headers="$ac_config_headers config.h"
-BASHVERS=4.0
-RELSTATUS=maint
+BASHVERS=4.1
+RELSTATUS=alpha
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bash $as_me 4.0-maint, which was
+This file was extended by bash $as_me 4.1-alpha, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-bash config.status 4.0-maint
+bash config.status 4.1-alpha
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
'configure.in'
],
{
- 'AM_PROG_F77_C_O' => 1,
'_LT_AC_TAGCONFIG' => 1,
- 'm4_pattern_forbid' => 1,
+ 'AM_PROG_F77_C_O' => 1,
'AC_INIT' => 1,
- 'AC_CANONICAL_TARGET' => 1,
+ 'm4_pattern_forbid' => 1,
'_AM_COND_IF' => 1,
- 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
- 'AC_CANONICAL_HOST' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
+ 'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
- 'AC_CONFIG_LINKS' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
- 'LT_SUPPORTED_TAG' => 1,
+ 'AC_CONFIG_LINKS' => 1,
'm4_sinclude' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_m4_warn' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
'_AM_SUBST_NOTMAKE' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'm4_pattern_allow' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
- 'AM_CONDITIONAL' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
+ 'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'm4_include' => 1,
-m4trace:configure.in:29: -1- AC_INIT([bash], [4.0-maint], [bug-bash@gnu.org])
+m4trace:configure.in:29: -1- AC_INIT([bash], [4.1-alpha], [bug-bash@gnu.org])
m4trace:configure.in:29: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:29: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:29: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
register int s, os;
os = 0;
- while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP)) <= start) &&
+ while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_NOSKIPCMD)) <= start) &&
rl_line_buffer[s])
os = s+1;
return os;
register int i, r;
intmax_t mi;
sh_parser_state_t ps;
- char *cmd, *value, *l, *ce;
+ char *cmd, *value, *l, *l1, *ce;
SHELL_VAR *v;
char ibuf[INT_STRLEN_BOUND(int) + 1];
v = bind_variable ("READLINE_LINE", rl_line_buffer, 0);
if (v)
VSETATTR (v, att_exported);
- l = value_cell (v);
+ l = v ? value_cell (v) : 0;
value = inttostr (rl_point, ibuf, sizeof (ibuf));
v = bind_int_variable ("READLINE_POINT", value);
if (v)
restore_parser_state (&ps);
v = find_variable ("READLINE_LINE");
- if (value_cell (v) != l)
+ l1 = v ? value_cell (v) : 0;
+ if (l1 != l)
maybe_make_readline_line (value_cell (v));
v = find_variable ("READLINE_POINT");
if (v && legal_number (value_cell (v), &mi))
width /= 2;
if (width > sizeof (blurb))
width = sizeof (blurb);
+ if (width <= 3)
+ width = 40;
height = (num_shell_builtins + 1) / 2; /* number of rows */
for (i = 0; i < height; i++)
$BUILTIN help
$FUNCTION help_builtin
$DEPENDS_ON HELP_BUILTIN
-$SHORT_DOC help [-ds] [pattern ...]
+$SHORT_DOC help [-dms] [pattern ...]
Display information about builtin commands.
Displays brief summaries of builtin commands. If PATTERN is
#! /bin/sh
-# From configure.in for Bash 4.0, version 4.014.
+# From configure.in for Bash 4.1, version 4.015.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for bash 4.0-maint.
+# Generated by GNU Autoconf 2.63 for bash 4.1-alpha.
#
# Report bugs to <bug-bash@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='4.0-maint'
-PACKAGE_STRING='bash 4.0-maint'
+PACKAGE_VERSION='4.1-alpha'
+PACKAGE_STRING='bash 4.1-alpha'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
ac_unique_file="shell.h"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bash 4.0-maint to adapt to many kinds of systems.
+\`configure' configures bash 4.1-alpha to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bash 4.0-maint:";;
+ short | recursive ) echo "Configuration of bash 4.1-alpha:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bash configure 4.0-maint
+bash configure 4.1-alpha
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bash $as_me 4.0-maint, which was
+It was created by bash $as_me 4.1-alpha, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
ac_config_headers="$ac_config_headers config.h"
-BASHVERS=4.0
-RELSTATUS=maint
+BASHVERS=4.1
+RELSTATUS=alpha
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bash $as_me 4.0-maint, which was
+This file was extended by bash $as_me 4.1-alpha, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-bash config.status 4.0-maint
+bash config.status 4.1-alpha
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
dnl
-dnl Configure script for bash-4.0
+dnl Configure script for bash-4.1
dnl
dnl report bugs to chet@po.cwru.edu
dnl
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_REVISION([for Bash 4.0, version 4.014])dnl
+AC_REVISION([for Bash 4.1, version 4.015])dnl
-define(bashvers, 4.0)
-define(relstatus, maint)
+define(bashvers, 4.1)
+define(relstatus, alpha)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
# static version specified as -llibname to override the
# dynamic version
case "${host_os}" in
- darwin[[89]]*) READLINE_LIB='${READLINE_LIBRARY}' ;;
+ darwin[[89]]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
*) READLINE_LIB=-lreadline ;;
esac
fi
# static version specified as -llibname to override the
# dynamic version
case "${host_os}" in
- darwin[[89]]*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
+ darwin[[89]]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
*) HISTORY_LIB=-lhistory ;;
esac
fi
BASH_CHECK_MULTIBYTE
-if test "$am_cv_func_iconv" = yes; then
- OLDLIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
- AC_CHECK_FUNCS(locale_charset)
- LIBS="$OLDLIBS"
-fi
-
dnl checks for the dynamic loading library functions in libc and libdl
if test "$opt_static_link" != yes; then
AC_CHECK_LIB(dl, dlopen)
The @code{ulimit} builtin uses a block size of 512 bytes for the @option{-c}
and @option{-f} options.
+@item
+The arrival of @code{SIGCHLD} when a trap is set on @code{SIGCHLD} does
+not interrupt the @code{wait} builtin and cause it to return immediately.
+The trap command is run once for each child that exits.
+
@end enumerate
There is other @sc{posix} behavior that Bash does not implement by
Conditional operators such as @samp{-f} must be unquoted to be recognized
as primaries.
+When used with @samp{[[}, The @samp{<} and @samp{>} operators sort
+lexicographically using the current locale.
+
When the @samp{==} and @samp{!=} operators are used, the string to the
right of the operator is considered a pattern and matched according
to the rules described below in @ref{Pattern Matching}.
The @code{ulimit} builtin uses a block size of 512 bytes for the @option{-c}
and @option{-f} options.
+@item
+The arrival of @code{SIGCHLD} when a trap is set on @code{SIGCHLD} does
+not interrupt the @code{wait} builtin and cause it to return immediately.
+
@end enumerate
There is other @sc{posix} behavior that Bash does not implement by
if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
trap_list[SIGCHLD] != (char *)IGNORE_SIG)
{
- if (this_shell_builtin && this_shell_builtin == wait_builtin)
+ if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
{
interrupt_immediately = 0;
trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
if (interactive && job_control == 0)
QUIT;
+ /* Check for terminating signals and exit the shell if we receive one */
+ CHECK_TERMSIG;
/* If we say wait_for (), then we have a record of this child somewhere.
If it and none of its peers are running, don't call waitchld(). */
old SIGINT signal handler. */
if (interactive && job_control == 0)
QUIT;
+ /* Check for terminating signals and exit the shell if we receive one */
+ CHECK_TERMSIG;
}
while (PRUNNING (child) || (job != NO_JOB && RUNNING (job)));
: 0;
if (sigchld || block == 0)
waitpid_flags |= WNOHANG;
+ /* Check for terminating signals and exit the shell if we receive one */
CHECK_TERMSIG;
pid = WAITPID (-1, &status, waitpid_flags);
if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
trap_list[SIGCHLD] != (char *)IGNORE_SIG)
{
- if (this_shell_builtin && this_shell_builtin == wait_builtin)
+ if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
{
interrupt_immediately = 0;
trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
wait_signal_received = SIGCHLD;
longjmp (wait_intr_buf, 1);
}
-
+itrace("waitchld: call run_sigchld_trap (%d)", children_exited);
run_sigchld_trap (children_exited);
}
/* Check to see if this terminal has a meta key and clear the capability
variables if there is none. */
- term_has_meta = (tgetflag ("km") || tgetflag ("MT"));
- if (!term_has_meta)
+ term_has_meta = tgetflag ("km") != 0;
+ if (term_has_meta == 0)
_rl_term_mm = _rl_term_mo = (char *)NULL;
/* Attempt to find and bind the arrow keys. Do not override already
quotes. */
int extended_quote = 1;
-/* The decoded prompt string. Used if READLINE is not defined or if
- editing is turned off. Analogous to current_readline_prompt. */
-static char *current_decoded_prompt;
-
/* The number of lines read from input while creating the current command. */
int current_command_line_count;
/* The line number in a script at which an arithmetic for command starts. */
static int arith_for_lineno;
+/* The decoded prompt string. Used if READLINE is not defined or if
+ editing is turned off. Analogous to current_readline_prompt. */
+static char *current_decoded_prompt;
+
/* The last read token, or NULL. read_token () uses this for context
checking. */
static int last_read_token;
/* The token read prior to token_before_that. */
static int two_tokens_ago;
+static int global_extglob;
+
/* The line number in a script where the word in a `case WORD', `select WORD'
or `for WORD' begins. This is a nested command maximum, since the array
index is decremented after a case, select, or for command is parsed. */
dstack.delimiter_depth = 0; /* No delimiters found so far. */
open_brace_count = 0;
+ /* Reset to global value of extended glob */
+ if (parser_state & PST_EXTPAT)
+{
+itrace("reset_parser: parser_state includes PST_EXTPAT");
+ extended_glob = global_extglob;
+}
+
parser_state = 0;
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
/* binop */
tok = read_token (READ);
if (tok == WORD && test_binop (yylval.word->word))
- op = yylval.word;
+ {
+ op = yylval.word;
+ if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0')))
+ parser_state |= PST_EXTPAT;
+ else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0')
+ parser_state |= PST_EXTPAT;
+ }
#if defined (COND_REGEXP)
else if (tok == WORD && STREQ (yylval.word->word, "=~"))
{
}
/* rhs */
+ if (parser_state & PST_EXTPAT)
+ extended_glob = 1;
tok = read_token (READ);
- parser_state &= ~PST_REGEXP;
+ if (parser_state & PST_EXTPAT)
+ extended_glob = global_extglob;
+ parser_state &= ~(PST_REGEXP|PST_EXTPAT);
+
if (tok == WORD)
{
tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
{
COND_COM *cexp;
+ global_extglob = extended_glob;
cexp = cond_expr ();
return (make_cond_command (cexp));
}
quotes. */
int extended_quote = 1;
-/* The decoded prompt string. Used if READLINE is not defined or if
- editing is turned off. Analogous to current_readline_prompt. */
-static char *current_decoded_prompt;
-
/* The number of lines read from input while creating the current command. */
int current_command_line_count;
/* The line number in a script at which an arithmetic for command starts. */
static int arith_for_lineno;
+/* The decoded prompt string. Used if READLINE is not defined or if
+ editing is turned off. Analogous to current_readline_prompt. */
+static char *current_decoded_prompt;
+
/* The last read token, or NULL. read_token () uses this for context
checking. */
static int last_read_token;
/* The token read prior to token_before_that. */
static int two_tokens_ago;
+static int global_extglob;
+
/* The line number in a script where the word in a `case WORD', `select WORD'
or `for WORD' begins. This is a nested command maximum, since the array
index is decremented after a case, select, or for command is parsed. */
dstack.delimiter_depth = 0; /* No delimiters found so far. */
open_brace_count = 0;
+ /* Reset to global value of extended glob */
+ if (parser_state & PST_EXTPAT)
+{
+itrace("reset_parser: parser_state includes PST_EXTPAT");
+ extended_glob = global_extglob;
+}
+
parser_state = 0;
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
/* binop */
tok = read_token (READ);
if (tok == WORD && test_binop (yylval.word->word))
- op = yylval.word;
+ {
+ op = yylval.word;
+ if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0')))
+ parser_state |= PST_EXTPAT;
+ else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0')
+ parser_state |= PST_EXTPAT;
+ }
#if defined (COND_REGEXP)
else if (tok == WORD && STREQ (yylval.word->word, "=~"))
{
}
/* rhs */
+ if (parser_state & PST_EXTPAT)
+{
+ extended_glob = 1;
+itrace("cond_node: temporarily set extended_glob to 1");
+}
tok = read_token (READ);
- parser_state &= ~PST_REGEXP;
+ if (parser_state & PST_EXTPAT)
+{
+itrace("cond_node: reset extended_glob to %d", global_extglob);
+ extended_glob = global_extglob;
+}
+ parser_state &= ~(PST_REGEXP|PST_EXTPAT);
if (tok == WORD)
{
tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
{
COND_COM *cexp;
+ global_extglob = extended_glob;
cexp = cond_expr ();
return (make_cond_command (cexp));
}
t_string[tlen] = '\0';
#if defined (MACOSX)
-temp = fnx_fromfs (t_string, tlen);
-if (temp != t_string)
- strcpy (t_string, temp);
+ /* Convert from "fs" format to "input" format */
+ temp = fnx_fromfs (t_string, strlen (t_string));
+ if (temp != t_string)
+ strcpy (t_string, temp);
#endif
+
#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
/* Abbreviate \W as ~ if $PWD == $HOME */
# include "input.h"
/* Possible states for the parser that require it to do special things. */
-#define PST_CASEPAT 0x00001 /* in a case pattern list */
-#define PST_ALEXPNEXT 0x00002 /* expand next word for aliases */
-#define PST_ALLOWOPNBRC 0x00004 /* allow open brace for function def */
-#define PST_NEEDCLOSBRC 0x00008 /* need close brace */
-#define PST_DBLPAREN 0x00010 /* double-paren parsing */
-#define PST_SUBSHELL 0x00020 /* ( ... ) subshell */
-#define PST_CMDSUBST 0x00040 /* $( ... ) command substitution */
-#define PST_CASESTMT 0x00080 /* parsing a case statement */
-#define PST_CONDCMD 0x00100 /* parsing a [[...]] command */
-#define PST_CONDEXPR 0x00200 /* parsing the guts of [[...]] */
-#define PST_ARITHFOR 0x00400 /* parsing an arithmetic for command */
-#define PST_ALEXPAND 0x00800 /* OK to expand aliases - unused */
-#define PST_CMDTOKEN 0x01000 /* command token OK - unused */
-#define PST_COMPASSIGN 0x02000 /* parsing x=(...) compound assignment */
-#define PST_ASSIGNOK 0x04000 /* assignment statement ok in this context */
-#define PST_EOFTOKEN 0x08000 /* yylex checks against shell_eof_token */
-#define PST_REGEXP 0x10000 /* parsing an ERE/BRE as a single word */
-#define PST_HEREDOC 0x20000 /* reading body of here-document */
-#define PST_REPARSE 0x40000 /* re-parsing in parse_string_to_word_list */
-#define PST_REDIRLIST 0x80000 /* parsing a list of redirctions preceding a simple command name */
+#define PST_CASEPAT 0x000001 /* in a case pattern list */
+#define PST_ALEXPNEXT 0x000002 /* expand next word for aliases */
+#define PST_ALLOWOPNBRC 0x000004 /* allow open brace for function def */
+#define PST_NEEDCLOSBRC 0x000008 /* need close brace */
+#define PST_DBLPAREN 0x000010 /* double-paren parsing */
+#define PST_SUBSHELL 0x000020 /* ( ... ) subshell */
+#define PST_CMDSUBST 0x000040 /* $( ... ) command substitution */
+#define PST_CASESTMT 0x000080 /* parsing a case statement */
+#define PST_CONDCMD 0x000100 /* parsing a [[...]] command */
+#define PST_CONDEXPR 0x000200 /* parsing the guts of [[...]] */
+#define PST_ARITHFOR 0x000400 /* parsing an arithmetic for command */
+#define PST_ALEXPAND 0x000800 /* OK to expand aliases - unused */
+#define PST_EXTPAT 0x001000 /* parsing an extended shell pattern */
+#define PST_COMPASSIGN 0x002000 /* parsing x=(...) compound assignment */
+#define PST_ASSIGNOK 0x004000 /* assignment statement ok in this context */
+#define PST_EOFTOKEN 0x008000 /* yylex checks against shell_eof_token */
+#define PST_REGEXP 0x010000 /* parsing an ERE/BRE as a single word */
+#define PST_HEREDOC 0x020000 /* reading body of here-document */
+#define PST_REPARSE 0x040000 /* re-parsing in parse_string_to_word_list */
+#define PST_REDIRLIST 0x080000 /* parsing a list of redirctions preceding a simple command name */
+
/* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
struct dstack {
#define PST_REGEXP 0x10000 /* parsing an ERE/BRE as a single word */
#define PST_HEREDOC 0x20000 /* reading body of here-document */
#define PST_REPARSE 0x40000 /* re-parsing in parse_string_to_word_list */
+#define PST_REDIRLIST 0x80000 /* parsing a list of redirctions preceding a simple command name */
/* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
struct dstack {
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 33
+#define PATCHLEVEL 0
#endif /* _PATCHLEVEL_H_ */
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 17
+#define PATCHLEVEL 33
#endif /* _PATCHLEVEL_H_ */
#: arrayfunc.c:313 builtins/declare.def:474
#, c-format
msgid "%s: cannot convert indexed to associative array"
-msgstr ""
+msgstr "%s: ní féidir eagar innéacsaithe a thiontú go heagar comhthiomsaitheach"
#: arrayfunc.c:479
#, c-format
msgid "%s: invalid associative array key"
-msgstr ""
+msgstr "%s: eochair neamhbhailí eagair chomhthiomsaithigh"
#: arrayfunc.c:481
#, c-format
#: arrayfunc.c:517
#, c-format
msgid "%s: %s: must use subscript when assigning associative array"
-msgstr ""
+msgstr "%s: %s: caithfear foscript a úsáid le sannadh chuig eagar comhthiomsaitheach"
#: bashhist.c:379
#, c-format
#: builtins/complete.def:786
msgid "not currently executing completion function"
-msgstr ""
+msgstr "níl an fheidhm chomhlánaithe á rith faoi láthair"
#: builtins/declare.def:122
msgid "can only be used in a function"
#: builtins/declare.def:468
#, c-format
msgid "%s: cannot convert associative to indexed array"
-msgstr ""
+msgstr "%s: ní féidir eagar comhthiomsaitheach a thiontú go heagar innéacsaithe"
#: builtins/enable.def:137 builtins/enable.def:145
msgid "dynamic loading not available"
#: builtins/mapfile.def:269
#, c-format
msgid "%s: invalid array origin"
-msgstr ""
+msgstr "%s: bunphointe neamhbhailí eagair"
#: builtins/mapfile.def:286
#, c-format
msgid "%s: invalid callback quantum"
-msgstr ""
+msgstr "%s: candam neamhbhailí aisghlaoigh"
#: builtins/mapfile.def:318
msgid "empty array variable name"
#: expr.c:241
msgid "expression recursion level exceeded"
-msgstr ""
+msgstr "imithe thar leibhéal athchursála sloinn"
#: expr.c:265
msgid "recursion stack underflow"
#: input.c:94 subst.c:4559
#, c-format
msgid "cannot reset nodelay mode for fd %d"
-msgstr ""
+msgstr "ní féidir an mód gan mhoill a athshocrú le haghaidh an tuairisceora chomhaid %d"
#: input.c:258
#, c-format
#: jobs.c:466
msgid "start_pipeline: pgrp pipe"
-msgstr ""
+msgstr "start_pipeline: pgrp píopa"
#: jobs.c:887
#, c-format
msgid "forked pid %d appears in running job %d"
-msgstr ""
+msgstr "tá an aitheantas an phróisis ghabhlaithe %d sa jab %d atá ag rith"
#: jobs.c:1005
#, c-format
#: jobs.c:1110
#, c-format
msgid "add_process: process %5ld (%s) in the_pipeline"
-msgstr ""
+msgstr "add_process: próiseas %5ld (%s) sa phíblíne"
#: jobs.c:1113
#, c-format
#: jobs.c:1568
#, c-format
msgid " (wd: %s)"
-msgstr ""
+msgstr " (comhadlann oibre: %s)"
#: jobs.c:1771
#, c-format
msgid "child setpgid (%ld to %ld)"
-msgstr ""
+msgstr "setpgid macphróisis (%ld go %ld)"
#: jobs.c:2099 nojobs.c:585
#, c-format
msgid "wait: pid %ld is not a child of this shell"
-msgstr "wait: níl an próiseas %ld ina mhac den bhlaosc seo."
+msgstr "wait: níl an próiseas %ld ina mhacphróiseas den bhlaosc seo."
#: jobs.c:2326
#, c-format
#: jobs.c:3518 jobs.c:3531
#, c-format
msgid "(wd now: %s)\n"
-msgstr ""
+msgstr "(comhadlann oibre anois: %s)\n"
#: jobs.c:3563
msgid "initialize_job_control: getpgrp failed"
-msgstr ""
+msgstr "initialize_job_control: theip ar getpgrp"
#: jobs.c:3623
msgid "initialize_job_control: line discipline"
-msgstr ""
+msgstr "initialize_job_control: araíonacht líne"
#: jobs.c:3633
msgid "initialize_job_control: setpgid"
-msgstr ""
+msgstr "initialize_job_control: setpgid"
#: jobs.c:3661
#, c-format
#: make_cmd.c:651
#, c-format
msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
-msgstr ""
+msgstr "cáipéis leabaithe ag líne %d teormharcáilte le deireadh comhaid (\"%s\" á lorg)"
#: make_cmd.c:746
#, c-format
#: redir.c:162
#, c-format
msgid "cannot create temp file for here-document: %s"
-msgstr ""
+msgstr "ní féidir cáipéis shealadach a chruthú don cháipéis leabaithe: %s"
#: redir.c:517
msgid "/dev/(tcp|udp)/host/port not supported without networking"
#: siglist.c:47
msgid "Bogus signal"
-msgstr ""
+msgstr "Droch-chomhartha"
#: siglist.c:50
msgid "Hangup"
#: siglist.c:66
msgid "BPT trace/trap"
-msgstr ""
+msgstr "Rianú/gaistiú brisphointe"
#: siglist.c:74
msgid "ABORT instruction"
#: siglist.c:82
msgid "Floating point exception"
-msgstr ""
+msgstr "Eisceacht snámhphointe"
#: siglist.c:86
msgid "Killed"
-msgstr ""
+msgstr "Maraithe"
#: siglist.c:90
msgid "Bus error"
#: siglist.c:94
msgid "Segmentation fault"
-msgstr ""
+msgstr "Fabht deighilte"
#: siglist.c:98
msgid "Bad system call"
#: siglist.c:106
msgid "Alarm clock"
-msgstr ""
+msgstr "Clog aláraim"
#: siglist.c:110
msgid "Terminated"
-msgstr ""
+msgstr "Críochnaithe"
#: siglist.c:114
msgid "Urgent IO condition"
-msgstr ""
+msgstr "Staid phráinneach I/A"
#: siglist.c:118
msgid "Stopped (signal)"
#: siglist.c:134
msgid "Child death or stop"
-msgstr ""
+msgstr "Bás macphróisis nó stopadh"
#: siglist.c:138
msgid "Stopped (tty input)"
#: siglist.c:150
msgid "CPU limit"
-msgstr ""
+msgstr "Teorainn LAP"
#: siglist.c:154
msgid "File limit"
-msgstr ""
+msgstr "Teorainn chomhad"
#: siglist.c:158
msgid "Alarm (virtual)"
-msgstr ""
+msgstr "Aláram (fíorúil)"
#: siglist.c:162
msgid "Alarm (profile)"
-msgstr ""
+msgstr "Aláram (próifíl)"
#: siglist.c:166
msgid "Window changed"
#: siglist.c:170
msgid "Record lock"
-msgstr ""
+msgstr "Glas taifid"
#: siglist.c:174
msgid "User signal 1"
#: siglist.c:182
msgid "HFT input data pending"
-msgstr ""
+msgstr "sonraí ionchuir HFT ar feitheamh"
#: siglist.c:186
msgid "power failure imminent"
#: siglist.c:194
msgid "migrate process to another CPU"
-msgstr ""
+msgstr "bog próiseas go LAP eile"
#: siglist.c:198
msgid "programming error"
-msgstr ""
+msgstr "earráid ríomhchláraithe"
#: siglist.c:202
msgid "HFT monitor mode granted"
-msgstr ""
+msgstr "mód monatóireachta HFT ceadaithe"
#: siglist.c:206
msgid "HFT monitor mode retracted"
-msgstr ""
+msgstr "mód monatóireachta HFT cealaithe"
#: siglist.c:210
msgid "HFT sound sequence has completed"
-msgstr ""
+msgstr "seicheamh fuaime HFT críochnaithe"
#: siglist.c:214
msgid "Information request"
-msgstr ""
+msgstr "Iarratas faisnéise"
#: siglist.c:222
msgid "Unknown Signal #"
#: subst.c:4504
msgid "cannot make child for process substitution"
-msgstr "Ní féidir mac a dhéanamh le haghaidh ionadaíocht próisis."
+msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadaíocht próisis."
#: subst.c:4549
#, c-format
#: subst.c:4799
msgid "cannot make child for command substitution"
-msgstr "Ní féidir mac a dhéanamh le haghaidh ionadú ordaithe."
+msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadú ordaithe."
#: subst.c:4816
msgid "command_substitute: cannot duplicate pipe as fd 1"
#: test.c:145
msgid "argument expected"
-msgstr "Bhíothas ag súil le hargóint"
+msgstr "Bhíothas ag súil le hargóint."
#: test.c:154
#, c-format
#: test.c:264
#, c-format
msgid "`)' expected, found %s"
-msgstr "Ag súil le \")\", ach fuarthas %s"
+msgstr "Ag súil le \")\", ach fuarthas %s."
#: test.c:279 test.c:688 test.c:691
#, c-format
#: variables.c:3794
msgid "pop_var_context: head of shell_variables not a function context"
-msgstr ""
+msgstr "pop_var_context: ní comhthéacs feidhme é ceann shell_variables"
#: variables.c:3807
msgid "pop_var_context: no global_variables context"
#: variables.c:3881
msgid "pop_scope: head of shell_variables not a temporary environment scope"
-msgstr ""
+msgstr "pop_scope: ní scóip shealadach thimpeallachta é ceann shell_variables"
#: version.c:46
msgid "Copyright (C) 2009 Free Software Foundation, Inc."
#: builtins.c:58
msgid "builtin [shell-builtin [arg ...]]"
-msgstr ""
+msgstr "builtin [ordú-ionsuite-blaoisce [argóint ...]]"
#: builtins.c:61
msgid "caller [expr]"
#: builtins.c:80
msgid "local [option] name[=value] ..."
-msgstr "local [rogha] ainm[=luach] ..."
+msgstr "local [ROGHA] AINM[=LUACH] ..."
#: builtins.c:83
msgid "echo [-neE] [arg ...]"
#: builtins.c:103
msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
-msgstr ""
+msgstr "fc [-e AINM_E] [-lnr] [CÉAD] [DEIREANACH] nó fc -s [PATRÚN=IONADAÍ] [ORDÚ]"
#: builtins.c:107
msgid "fg [job_spec]"
-msgstr "fg [sonrú_jab]"
+msgstr "fg [SONRÚ_JAB]"
#: builtins.c:111
msgid "bg [job_spec ...]"
-msgstr "bg [sonrú_jab ...]"
+msgstr "bg [SONRÚ_JAB ...]"
#: builtins.c:114
msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
-msgstr "hash [-lr] [-p conair] [-dt] [ainm ...]"
+msgstr "hash [-lr] [-p CONAIR] [-dt] [AINM ...]"
#: builtins.c:117
msgid "help [-ds] [pattern ...]"
-msgstr "help [-ds] [patrún ...]"
+msgstr "help [-ds] [PATRÚN ...]"
#: builtins.c:121
msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]"
-msgstr "history [-c] [-d seach-chur] [n] nó history -anrw [comhadainm] nó history -ps argóint [argóint...]"
+msgstr "history [-c] [-d SEACH_CHUR] [n] nó history -anrw [COMHADAINM] nó history -ps ARGÓINT [ARGÓINT...]"
#: builtins.c:125
msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
-msgstr "jobs [-lnprs] [sonrú_jab ...] nó jobs -x ordú [argóintí]"
+msgstr "jobs [-lnprs] [SONRÚ_JAB ...] nó jobs -x ORDÚ [ARGÓINTÍ]"
#: builtins.c:129
msgid "disown [-h] [-ar] [jobspec ...]"
-msgstr "disown [-h] [-ar] [sonrú_jab ...]"
+msgstr "disown [-h] [-ar] [SONRÚ_JAB ...]"
#: builtins.c:132
msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]"
-msgstr ""
+msgstr "kill [-s sonrú_comhartha | -n uimhir_chomhartha | -sonrú_comhartha] aitheantóir_próisis | sonrú_jab ... nó kill -l [sonrú_comhartha]"
#: builtins.c:134
msgid "let arg [arg ...]"
#: builtins.c:136
msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-p prompt] [-t timeout] [-u fd] [name ...]"
-msgstr ""
+msgstr "read [-ers] [-a eagar] [-d teormharcóir] [-i téacs] [-n líon_carachtar] [-p leid] [-t teorainn_ama] [-u tuairisceoir_comhaid] [ainm ...]"
#: builtins.c:138
msgid "return [n]"
#: builtins.c:210
msgid "variables - Names and meanings of some shell variables"
-msgstr "variables - Ainmneacha agus mínithe d'athróga áirithe blaoisce"
+msgstr "Athróga - ainmneacha agus mínithe ar fathróga áirithe blaoisce"
#: builtins.c:213
msgid "pushd [-n] [+N | -N | dir]"
#: builtins.c:229
msgid "complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]"
-msgstr ""
+msgstr "complete [-abcdefgjksuv] [-pr] [-o rogha] [-A gníomh] [-G patrún] [-W liosta_focal] [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S iarmhír] [ainm ...]"
#: builtins.c:233
msgid "compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
-msgstr ""
+msgstr "compgen [-abcdefgjksuv] [-o rogha] [-A gníomh] [-G patrún] [-W liosta_focal] [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S iarmhír] [focal]"
#: builtins.c:237
msgid "compopt [-o|+o option] [name ...]"
" -p\tPriontáil gach ailias sainithe i bhfoirm inathúsáidte.\n"
" \n"
" Stádas Scortha:\n"
-" Cuireann alias an luach true ar ais mura thugtar AINM nach bhfuil\n"
+" Aischuirtear an luach true mura thugtar AINM nach bhfuil\n"
" ailias sainithe dó."
#: builtins.c:276
" \n"
" Return success unless a NAME is not an existing alias."
msgstr ""
+"Bain gach AINM de liosta na n-ailiasanna sainithe.\n"
+" \n"
+" Roghanna:\n"
+" -a\tbain gach sainiú ailias.\n"
+" \n"
+" Aischuirtear rath ach sa chás nach bhfuil AINM ann."
#: builtins.c:289
msgid ""
" Mar réamhshocrú, oibríonn \"pwd\" faoi mar a bheadh \"-L\" sonraithe.\n"
" \n"
" Stádas Scortha:\n"
-" Aischuireann luach de 0 mura thugtar rogha neamhbhailí nó mura féidir\n"
+" Aischuirtear luach de 0 mura thugtar rogha neamhbhailí nó mura féidir\n"
" an chomhadlann reatha a léamh."
#: builtins.c:428
msgstr ""
"Ordú neamhnitheach.\n"
" \n"
-" Gan éifeacht. Ní dhéanann an t-ordú faic.\n"
+" Gan éifeacht; ní dhéanann an t-ordú faic.\n"
" \n"
" Stadas Scortha:\n"
" Éiríonn leis i gcónaí."
" Exit Status:\n"
" Always succeeds."
msgstr ""
+"Aischuir toradh rathúil.\n"
+" \n"
+" Stádas Scortha:\n"
+" Éiríonn leis i gcónaí."
#: builtins.c:448
msgid ""
" Exit Status:\n"
" Always fails."
msgstr ""
+"Aischuir toradh neamhrathúil.\n"
+" \n"
+" Stádas Scortha:\n"
+" Teipeann air i gcónaí."
#: builtins.c:457
msgid ""
msgstr ""
"Socraigh luachanna agus airíonna athróg.\n"
" \n"
-" Imithe i léig. Feic 'help declare'."
+" Imithe i léig. Feic \"help declare\"."
#: builtins.c:520
msgid ""
" Returns success unless an invalid option is supplied, an error occurs,\n"
" or the shell is not executing a function."
msgstr ""
+"Sainigh athróga logánta.\n"
+" \n"
+" Cruthaítear athróg logánta darbh ainm AINM, agus cuirtear LUACH leis. Is\n"
+" féidir le ROGHA a bheith ceann ar bith de na roghanna a ghlacann \"declare\" leo.\n"
+" \n"
+" Ní féidir athróga logánta a úsáid ach laistigh de fheidhm. Tá siad infheicthe\n"
+" san fheidhm ina shainítear iad agus a mic amháin.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath mura thugtar rogha neamhbhailí, nó mura tharlaíonn earráid,\n"
+" nó mura bhfuil an bhlaosc ag rith feidhme."
#: builtins.c:537
msgid ""
" Exit Status:\n"
" Returns success unless a write error occurs."
msgstr ""
+"Scríobh argóintí go dtí an gnáthaschur.\n"
+" \n"
+" Taispeáin na hARGÓINTÍ ar an ngnáthaschur agus líne nua ina ndiaidh.\n"
+" \n"
+" Roghanna:\n"
+" -n\tná hiarcheangail líne nua\n"
+" \n"
+" stádas Scortha:\n"
+" Aischuirtear rath ach i gcás earráide scríofa."
#: builtins.c:586
msgid ""
" Exit Status:\n"
" Returns exit status of command or success if command is null."
msgstr ""
+"Rith argóintí mar ordú blaoisce.\n"
+" \n"
+" Cuir ARGÓINTÍ i dteaghrán amháin, úsáid an toradh mar ionchur go dtí\n"
+" an bhlaosc, agus rith na horduithe toraidh.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear stádas scortha an ordaithe, nó rath más ordú neamhnitheach é."
#: builtins.c:626
msgid ""
" Exits a login shell with exit status N. Returns an error if not executed\n"
" in a login shell."
msgstr ""
+"Scoir de bhlaosc logála isteach.\n"
+" \n"
+" Scoireann de bhlaosc logála isteach le stádas scortha N. Aischuirtear\n"
+" earráid má ritear é i mblaosc nach blaosc logála isteach í."
#: builtins.c:708
msgid ""
" Exit Status:\n"
" Returns success or status of executed command; non-zero if an error occurs."
msgstr ""
+"Taispeáin nó rith orduithe ón liosta staire.\n"
+" \n"
+" Úsáidtear fc chun orduithe ón liosta staire a liostú, a chur in eagar, nó a ath-rith.\n"
+" Más uimhreacha iad CÉAD agus DEIREANACH, sonraíonn siad an raon, nó is\n"
+" féidir le CÉAD bheith ina theaghrán, rud a chiallaíonn an t-ordú is deireanaí a\n"
+" thosaíonn leis an teaghrán sin.\n"
+" \n"
+" Roghanna:\n"
+" -e AINM_E\troghnaigh an clár eagarthóra atá le húsáid. FCEDIT an réamhshocrú,\n"
+" \tansin EDITOR, agus ansin vi.\n"
+" -n\tfág uimhreacha na línte ar lár agus liosta á thaispeáint\n"
+" -r\taisiompaigh ord na línte (.i. liostaigh an ceann is nuaí ar dtús)\n"
+" \n"
+" San fhormáid \"fc -s [PATRÚN=IONADAÍ ...] [ORDÚ]\", ath-ritear ORDÚ\n"
+" tar éis an t-ionadú SEAN=NUA a dhéanamh.\n"
+" \n"
+" Ailias úsáideach is ea r='fc -s', sa chaoi go ritheann \"r cc\" an t-ordú is deireanaí\n"
+" a thosaíonn le \"cc\", agus ath-ritheann \"r\" an t-ordú is deireanaí.\n"
+" \n"
+" Stádas Scortha:n\\ Aischuirtear rath nó stádas an ordaithe rite; neamh-nialas má tharlaíonn earráid."
#: builtins.c:738
msgid ""
" Exit Status:\n"
" Status of command placed in foreground, or failure if an error occurs."
msgstr ""
+"Bog jab go dtí an tulra.\n"
+" \n"
+" Cuir an jab a shonraítear le SONRÚ_JAB sa tulra agus é mar an jab reatha.\n"
+" Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na blaoisce.\n"
+" \n"
+" Stádas Scortha:\n"
+" Stádas an ordaithe curtha sa tulra, nó teip má tharlaíonn earráid."
#: builtins.c:753
msgid ""
" Exit Status:\n"
" Returns success unless job control is not enabled or an error occurs."
msgstr ""
+"Bog jabanna go dtí an cúlra.\n"
+" \n"
+" Cuir an jab a shonraítear le SONRÚ_JAB sa chúlra cosúil le é a thosú le \"&\".\n"
+" Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na blaoisce.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach má tharlaíonn earráid nó mura bhfuil\n"
+" rialú jabanna cumasaithe."
#: builtins.c:767
msgid ""
" Exit Status:\n"
" Returns success unless PATTERN is not found or an invalid option is given."
msgstr ""
+"Taispeáin eolas maidir le horduithe ionsuite.\n"
+" \n"
+" Taispeántar achoimrí na n-orduithe ionsuite. Má shonraítear PATRÚN,\n"
+" taispeántar cabhair chuimsitheach faoi gach ordú a mheaitseálann PATRÚN;\n"
+" i gcásanna eile taispeántar liosta na n-ábhar cabhrach.\n"
+" \n"
+" Roghanna:\n"
+" -d\ttaispeáin cur síos gairid ar gach ábhar\n"
+" -m\ttaispeáin úsáid i bhformáid cosúil leis an lámhleabhar man(1)\n"
+" -s\tná taispeáin ach achoimre gairid úsáide le haghaidh gach ábhair a\n"
+" \tmheatseálann PATRÚN\n"
+" \n"
+" Argóintí:\n"
+" PATRÚN\tpatrún a shonraíonn ábhar cabhrach\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach sa chás nach n-aimsítear PATRÚN nó go dtugtar\n"
+" rogha neamhbhailí."
#: builtins.c:816
msgid ""
" Exit Status:\n"
" Always succeeds."
msgstr ""
+"Taispeáin amanna próisis.\n"
+" \n"
+" \n"
+"Taispeántar amanna carntha úsáideora agus córais na blaoisce agus a\n"
+" macphróiseas.\n"
+" \n"
+" Stádas Scortha:\n"
+" Éiríonn leis i gcónaí."
#: builtins.c:1317
msgid ""
#define LPAREN '('
#define RPAREN ')'
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN L'('
+#define WRPAREN L')'
+#endif
+
/* Evaluates to 1 if C is one of the shell's special parameters whose length
can be taken, but is also one of the special expansion characters. */
#define VALID_SPECIAL_LENGTH_PARAM(c) \
int *sindex;
int xflags;
{
- if (string[*sindex] == '(') /*)*/
+ if (string[*sindex] == LPAREN)
return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
else
{
char *delims;
int flags;
{
- int i, pass_next, backq, si, c, invert, skipquote;
+ int i, pass_next, backq, si, c, invert, skipquote, skipcmd;
size_t slen;
char *temp;
DECLARE_MBSTATE;
if (flags & SD_NOJMP)
no_longjmp_on_fatal_error = 1;
invert = (flags & SD_INVERT);
+ skipcmd = (flags & SD_NOSKIPCMD) == 0;
i = start;
pass_next = backq = 0;
: skip_double_quoted (string, slen, ++i);
/* no increment, the skip functions increment past the closing quote. */
}
- else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
+ else if (c == '$' && ((skipcmd && string[i+1] == LPAREN) || string[i+1] == LBRACE))
{
si = i + 2;
if (string[si] == '\0')
i++;
continue;
}
+#if defined (PROCESS_SUBSTITUTION)
+ else if (skipcmd && (c == '<' || c == '>') && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+ temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+ i = si;
+ if (string[i] == '\0')
+ break;
+ i++;
+ continue;
+ }
+#endif /* PROCESS_SUBSTITUTION */
else if ((skipquote || invert) && (member (c, delims) == 0))
break;
else
/* XXX - check this later if I ever implement `**' with special meaning,
since this will potentially result in `**' at the beginning or end */
len = STRLEN (pat);
- if (pat[0] != '*' || (pat[0] == '*' && pat[1] == '(' && extended_glob) || pat[len - 1] != '*') /*)*/
+ if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*')
{
p = npat = (char *)xmalloc (len + 3);
p1 = pat;
- if (*p1 != '*' || (*p1 == '*' && p1[1] == '(' && extended_glob)) /*)*/
+ if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))
*p++ = '*';
while (*p1)
*p++ = *p1++;
/* XXX - check this later if I ever implement `**' with special meaning,
since this will potentially result in `**' at the beginning or end */
len = wcslen (wpat);
- if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == L'(' && extended_glob) || wpat[len - 1] != L'*') /*)*/
+ if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*')
{
wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t));
wp1 = wpat;
- if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == '(' && extended_glob)) /*)*/
+ if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob))
*wp++ = L'*';
while (*wp1 != L'\0')
*wp++ = *wp1++;
i = count = 0;
while (i < len)
{
- if (s[i] == '(')
+ if (s[i] == LPAREN)
count++;
- else if (s[i] == ')')
+ else if (s[i] == RPAREN)
{
count--;
if (count < 0)
#define LPAREN '('
#define RPAREN ')'
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN L'('
+#define WRPAREN L')'
+#endif
+
/* Evaluates to 1 if C is one of the shell's special parameters whose length
can be taken, but is also one of the special expansion characters. */
#define VALID_SPECIAL_LENGTH_PARAM(c) \
int *sindex;
int xflags;
{
- if (string[*sindex] == '(') /*)*/
+ if (string[*sindex] == LPAREN)
return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
else
{
pass_next = backq = 0;
while (c = string[i])
{
+ /* If this is non-zero, we should not let quote characters be delimiters
+ and the current character is a single or double quote. We should not
+ test whether or not it's a delimiter until after we skip single- or
+ double-quoted strings. */
skipquote = ((flags & SD_NOQUOTEDELIM) && (c == '\'' || c =='"'));
if (pass_next)
{
i++;
continue;
}
+#if defined (PROCESS_SUBSTITUTION)
+ else if ((c == '<' || c == '>') && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+ temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+ i = si;
+ if (string[i] == '\0')
+ break;
+ i++;
+ continue;
+ }
+#endif /* PROCESS_SUBSTITUTION */
else if ((skipquote || invert) && (member (c, delims) == 0))
break;
else
/* XXX - check this later if I ever implement `**' with special meaning,
since this will potentially result in `**' at the beginning or end */
len = STRLEN (pat);
- if (pat[0] != '*' || (pat[0] == '*' && pat[1] == '(' && extended_glob) || pat[len - 1] != '*') /*)*/
+ if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*')
{
p = npat = (char *)xmalloc (len + 3);
p1 = pat;
- if (*p1 != '*' || (*p1 == '*' && p1[1] == '(' && extended_glob)) /*)*/
+ if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))
*p++ = '*';
while (*p1)
*p++ = *p1++;
/* XXX - check this later if I ever implement `**' with special meaning,
since this will potentially result in `**' at the beginning or end */
len = wcslen (wpat);
- if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == L'(' && extended_glob) || wpat[len - 1] != L'*') /*)*/
+ if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*')
{
wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t));
wp1 = wpat;
- if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == '(' && extended_glob)) /*)*/
+ if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob))
*wp++ = L'*';
while (*wp1 != L'\0')
*wp++ = *wp1++;
i = count = 0;
while (i < len)
{
- if (s[i] == '(')
+ if (s[i] == LPAREN)
count++;
- else if (s[i] == ')')
+ else if (s[i] == RPAREN)
{
count--;
if (count < 0)
#define SD_NOJMP 0x01 /* don't longjmp on fatal error. */
#define SD_INVERT 0x02 /* look for chars NOT in passed set */
#define SD_NOQUOTEDELIM 0x04 /* don't let single or double quotes act as delimiters */
+#define SD_NOSKIPCMD 0x08 /* don't skip over $(, <(, or >( command/process substitution */
extern int skip_to_delim __P((char *, int, char *, int));
/* Flags for skip_to_delim */
#define SD_NOJMP 0x01 /* don't longjmp on fatal error. */
#define SD_INVERT 0x02 /* look for chars NOT in passed set */
+#define SD_NOQUOTEDELIM 0x04 /* don't let single or double quotes act as delimiters */
extern int skip_to_delim __P((char *, int, char *, int));