mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-03 02:10:50 +02:00
commit bash-20040506 snapshot
This commit is contained in:
@@ -9420,3 +9420,32 @@ lib/readline/vi_mode.c
|
||||
of `last', since they're equal at call time and rl_vi_domove can
|
||||
change rl_numeric_arg (which vi apparently updates). Fixes redo bug
|
||||
of `c2....' reported by Marion Berryman <mwberryman@copper.net>
|
||||
|
||||
5/4
|
||||
---
|
||||
parse.y
|
||||
- fix decode_prompt_string to properly deal with strftime() returning 0
|
||||
|
||||
5/6
|
||||
---
|
||||
variables.c
|
||||
- in make_local_array_variable, return an already-existing local array
|
||||
variable immediately rather than creating a new array (causing a
|
||||
memory leak)
|
||||
|
||||
5/8
|
||||
---
|
||||
lib/readline/vi_mode.c
|
||||
- change rl_vi_domove to set rl_explicit_arg before calling
|
||||
rl_digit_loop1 so that multi-digit numeric arguments work right
|
||||
- _rl_vi_last_command is no longer static
|
||||
|
||||
lib/readline/rlprivate.h
|
||||
- new extern declaration for _rl_vi_last_command
|
||||
|
||||
lib/readline/text.c
|
||||
- change rl_newline to only call _rl_vi_reset_last if the last command
|
||||
(_rl_vi_last_command) is not a text modification command. This lets
|
||||
the last-command and last-argument work across command lines
|
||||
|
||||
|
||||
|
||||
@@ -9412,3 +9412,38 @@ builtins/cd.def
|
||||
- if get_working_directory fails and returns null (causing resetpwd
|
||||
to return NULL), use set_working_directory to set $PWD to the
|
||||
absolute pathname for which chdir just succeeded
|
||||
|
||||
5/1
|
||||
---
|
||||
lib/readline/vi_mode.c
|
||||
- in rl_vi_change_to, call _rl_vi_set_last with rl_numeric_arg instead
|
||||
of `last', since they're equal at call time and rl_vi_domove can
|
||||
change rl_numeric_arg (which vi apparently updates). Fixes redo bug
|
||||
of `c2....' reported by Marion Berryman <mwberryman@copper.net>
|
||||
|
||||
5/4
|
||||
---
|
||||
parse.y
|
||||
- fix decode_prompt_string to properly deal with strftime() returning 0
|
||||
|
||||
5/6
|
||||
---
|
||||
variables.c
|
||||
- in make_local_array_variable, return an already-existing local array
|
||||
variable immediately rather than creating a new array (causing a
|
||||
memory leak)
|
||||
|
||||
5/8
|
||||
---
|
||||
lib/readline/vi_mode.c
|
||||
- change rl_vi_domove to set rl_explicit_arg before calling
|
||||
rl_digit_loop1 so that multi-digit numeric arguments work right
|
||||
- _rl_vi_last_command is no longer static
|
||||
|
||||
lib/readline/rlprivate.h
|
||||
- new extern declaration for _rl_vi_last_command
|
||||
|
||||
lib/readline/text.c
|
||||
- change rl_newline to only call _rl_vi_reset_last if the last command
|
||||
(_rl_vi_last_command) is not a text modification command
|
||||
|
||||
|
||||
@@ -771,6 +771,7 @@ tests/jobs.tests f
|
||||
tests/jobs1.sub f
|
||||
tests/jobs2.sub f
|
||||
tests/jobs3.sub f
|
||||
tests/jobs4.sub f
|
||||
tests/jobs.right f
|
||||
tests/more-exp.tests f
|
||||
tests/more-exp.right f
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* chet@ins.cwru.edu
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
This file is trap.def, from which is created trap.c.
|
||||
It implements the builtin "trap" in Bash.
|
||||
|
||||
Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -121,7 +121,7 @@ trap_builtin (list)
|
||||
|
||||
operation = SET;
|
||||
first_arg = list->word->word;
|
||||
/* When not in posix mode, the historical behavior of looking for a
|
||||
/* When in posix mode, the historical behavior of looking for a
|
||||
missing first argument is disabled. To revert to the original
|
||||
signal handling disposition, use `-' as the first argument. */
|
||||
if (posixly_correct == 0 && first_arg && *first_arg &&
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
This file is trap.def, from which is created trap.c.
|
||||
It implements the builtin "trap" in Bash.
|
||||
|
||||
Copyright (C) 1987-2002 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, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
$PRODUCES trap.c
|
||||
|
||||
$BUILTIN trap
|
||||
$FUNCTION trap_builtin
|
||||
$SHORT_DOC trap [arg] [signal_spec ...] or trap -l
|
||||
The command ARG is to be read and executed when the shell receives
|
||||
signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are
|
||||
reset to their original values. If ARG is the null string each
|
||||
SIGNAL_SPEC is ignored by the shell and by the commands it invokes.
|
||||
If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from
|
||||
the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every
|
||||
command. If ARG is `-p' then the trap commands associated with
|
||||
each SIGNAL_SPEC are displayed. If no arguments are supplied or if
|
||||
only `-p' is given, trap prints the list of commands associated with
|
||||
each signal number. Each SIGNAL_SPEC is either a signal name in <signal.h>
|
||||
or a signal number. `trap -l' prints a list of signal names and their
|
||||
corresponding numbers. Note that a signal can be sent to the shell
|
||||
with "kill -signal $$".
|
||||
$END
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# ifdef _MINIX
|
||||
# include <sys/types.h>
|
||||
# endif
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "../bashtypes.h"
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include "../bashansi.h"
|
||||
|
||||
#include "../shell.h"
|
||||
#include "../trap.h"
|
||||
#include "common.h"
|
||||
#include "bashgetopt.h"
|
||||
|
||||
static void showtrap __P((int));
|
||||
static int display_traps __P((WORD_LIST *));
|
||||
|
||||
/* The trap command:
|
||||
|
||||
trap <arg> <signal ...>
|
||||
trap <signal ...>
|
||||
trap -l
|
||||
trap -p [sigspec ...]
|
||||
trap [--]
|
||||
|
||||
Set things up so that ARG is executed when SIGNAL(s) N is recieved.
|
||||
If ARG is the empty string, then ignore the SIGNAL(s). If there is
|
||||
no ARG, then set the trap for SIGNAL(s) to its original value. Just
|
||||
plain "trap" means to print out the list of commands associated with
|
||||
each signal number. Single arg of "-l" means list the signal names. */
|
||||
|
||||
/* Possible operations to perform on the list of signals.*/
|
||||
#define SET 0 /* Set this signal to first_arg. */
|
||||
#define REVERT 1 /* Revert to this signals original value. */
|
||||
#define IGNORE 2 /* Ignore this signal. */
|
||||
|
||||
extern int posixly_correct;
|
||||
|
||||
int
|
||||
trap_builtin (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
int list_signal_names, display, result, opt;
|
||||
|
||||
list_signal_names = display = 0;
|
||||
result = EXECUTION_SUCCESS;
|
||||
reset_internal_getopt ();
|
||||
while ((opt = internal_getopt (list, "lp")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'l':
|
||||
list_signal_names++;
|
||||
break;
|
||||
case 'p':
|
||||
display++;
|
||||
break;
|
||||
default:
|
||||
builtin_usage ();
|
||||
return (EX_USAGE);
|
||||
}
|
||||
}
|
||||
list = loptend;
|
||||
|
||||
opt = DSIG_NOCASE|DSIG_SIGPREFIX; /* flags for decode_signal */
|
||||
|
||||
if (list_signal_names)
|
||||
return (display_signal_list ((WORD_LIST *)NULL, 1));
|
||||
else if (display || list == 0)
|
||||
return (display_traps (list));
|
||||
else
|
||||
{
|
||||
char *first_arg;
|
||||
int operation, sig;
|
||||
|
||||
operation = SET;
|
||||
first_arg = list->word->word;
|
||||
/* When not in posix mode, the historical behavior of looking for a
|
||||
missing first argument is disabled. To revert to the original
|
||||
signal handling disposition, use `-' as the first argument. */
|
||||
if (posixly_correct == 0 && first_arg && *first_arg &&
|
||||
(*first_arg != '-' || first_arg[1]) &&
|
||||
signal_object_p (first_arg, opt))
|
||||
operation = REVERT;
|
||||
else
|
||||
{
|
||||
list = list->next;
|
||||
if (*first_arg == '\0')
|
||||
operation = IGNORE;
|
||||
else if (first_arg[0] == '-' && !first_arg[1])
|
||||
operation = REVERT;
|
||||
}
|
||||
|
||||
while (list)
|
||||
{
|
||||
sig = decode_signal (list->word->word, opt);
|
||||
|
||||
if (sig == NO_SIG)
|
||||
{
|
||||
sh_invalidsig (list->word->word);
|
||||
result = EXECUTION_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (operation)
|
||||
{
|
||||
case SET:
|
||||
set_signal (sig, first_arg);
|
||||
break;
|
||||
|
||||
case REVERT:
|
||||
restore_default_signal (sig);
|
||||
|
||||
/* Signals that the shell treats specially need special
|
||||
handling. */
|
||||
switch (sig)
|
||||
{
|
||||
case SIGINT:
|
||||
if (interactive)
|
||||
set_signal_handler (SIGINT, sigint_sighandler);
|
||||
else
|
||||
set_signal_handler (SIGINT, termination_unwind_protect);
|
||||
break;
|
||||
|
||||
case SIGQUIT:
|
||||
/* Always ignore SIGQUIT. */
|
||||
set_signal_handler (SIGQUIT, SIG_IGN);
|
||||
break;
|
||||
case SIGTERM:
|
||||
#if defined (JOB_CONTROL)
|
||||
case SIGTTIN:
|
||||
case SIGTTOU:
|
||||
case SIGTSTP:
|
||||
#endif /* JOB_CONTROL */
|
||||
if (interactive)
|
||||
set_signal_handler (sig, SIG_IGN);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case IGNORE:
|
||||
ignore_signal (sig);
|
||||
break;
|
||||
}
|
||||
}
|
||||
list = list->next;
|
||||
}
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static void
|
||||
showtrap (i)
|
||||
int i;
|
||||
{
|
||||
char *t, *p, *sn;
|
||||
|
||||
p = trap_list[i];
|
||||
|
||||
if (p == (char *)DEFAULT_SIG)
|
||||
return;
|
||||
|
||||
t = (p == (char *)IGNORE_SIG) ? (char *)NULL : sh_single_quote (p);
|
||||
sn = signal_name (i);
|
||||
/* Make sure that signals whose names are unknown (for whatever reason)
|
||||
are printed as signal numbers. */
|
||||
if (STREQN (sn, "SIGJUNK", 7) || STREQN (sn, "unknown", 7))
|
||||
printf ("trap -- %s %d\n", t ? t : "''", i);
|
||||
else if (posixly_correct)
|
||||
{
|
||||
if (STREQN (sn, "SIG", 3))
|
||||
printf ("trap -- %s %s\n", t ? t : "''", sn+3);
|
||||
else
|
||||
printf ("trap -- %s %s\n", t ? t : "''", sn);
|
||||
}
|
||||
else
|
||||
printf ("trap -- %s %s\n", t ? t : "''", sn);
|
||||
|
||||
FREE (t);
|
||||
}
|
||||
|
||||
static int
|
||||
display_traps (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
int result, i;
|
||||
|
||||
if (list == 0)
|
||||
{
|
||||
for (i = 0; i < BASH_NSIG; i++)
|
||||
showtrap (i);
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
for (result = EXECUTION_SUCCESS; list; list = list->next)
|
||||
{
|
||||
i = decode_signal (list->word->word, DSIG_NOCASE|DSIG_SIGPREFIX);
|
||||
if (i == NO_SIG)
|
||||
{
|
||||
sh_invalidsig (list->word->word);
|
||||
result = EXECUTION_FAILURE;
|
||||
}
|
||||
else
|
||||
showtrap (i);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
Binary file not shown.
+9
-4
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- Created on April, 20 2004 by texi2html 1.64 -->
|
||||
<!-- Created on May, 4 2004 by texi2html 1.64 -->
|
||||
<!--
|
||||
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
||||
Karl Berry <karl@freefriends.org>
|
||||
@@ -3661,6 +3661,11 @@ facilities (see section <A HREF="bashref.html#SEC114">8.7 Programmable Completio
|
||||
Many of the builtins have been extended by POSIX or Bash.
|
||||
</P><P>
|
||||
|
||||
Unless otherwise noted, each builtin command documented as accepting
|
||||
options preceded by <SAMP>`-'</SAMP> accepts <SAMP>`--'</SAMP>
|
||||
to signify the end of the options.
|
||||
</P><P>
|
||||
|
||||
<A NAME="Bourne Shell Builtins"></A>
|
||||
<HR SIZE="6">
|
||||
<A NAME="SEC57"></A>
|
||||
@@ -10390,7 +10395,7 @@ argument is ignored.
|
||||
Invoke an editor on the current command line, and execute the result as shell
|
||||
commands.
|
||||
Bash attempts to invoke
|
||||
<CODE>$FCEDIT</CODE>, <CODE>$EDITOR</CODE>, and <CODE>emacs</CODE>
|
||||
<CODE>$VISUAL</CODE>, <CODE>$EDITOR</CODE>, and <CODE>emacs</CODE>
|
||||
as the editor, in that order.
|
||||
<P>
|
||||
|
||||
@@ -14998,7 +15003,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>April, 20 2004</I>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>May, 4 2004</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
<P></P>
|
||||
@@ -15160,7 +15165,7 @@ the following structure:
|
||||
<BR>
|
||||
<FONT SIZE="-1">
|
||||
This document was generated
|
||||
by <I>Chet Ramey</I> on <I>April, 20 2004</I>
|
||||
by <I>Chet Ramey</I> on <I>May, 4 2004</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
|
||||
|
||||
+80
-77
@@ -2281,6 +2281,9 @@ Completion Builtins::).
|
||||
|
||||
Many of the builtins have been extended by POSIX or Bash.
|
||||
|
||||
Unless otherwise noted, each builtin command documented as accepting
|
||||
options preceded by `-' accepts `--' to signify the end of the options.
|
||||
|
||||
|
||||
File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands
|
||||
|
||||
@@ -6866,7 +6869,7 @@ Some Miscellaneous Commands
|
||||
|
||||
`edit-and-execute-command (C-xC-e)'
|
||||
Invoke an editor on the current command line, and execute the
|
||||
result as shell commands. Bash attempts to invoke `$FCEDIT',
|
||||
result as shell commands. Bash attempts to invoke `$VISUAL',
|
||||
`$EDITOR', and `emacs' as the editor, in that order.
|
||||
|
||||
|
||||
@@ -9305,81 +9308,81 @@ Node: Exit Status85774
|
||||
Node: Signals86969
|
||||
Node: Shell Scripts88924
|
||||
Node: Shell Builtin Commands91435
|
||||
Node: Bourne Shell Builtins92865
|
||||
Node: Bash Builtins109748
|
||||
Node: The Set Builtin137870
|
||||
Node: Special Builtins146088
|
||||
Node: Shell Variables147060
|
||||
Node: Bourne Shell Variables147496
|
||||
Node: Bash Variables149473
|
||||
Node: Bash Features168978
|
||||
Node: Invoking Bash169860
|
||||
Node: Bash Startup Files175671
|
||||
Node: Interactive Shells180541
|
||||
Node: What is an Interactive Shell?180943
|
||||
Node: Is this Shell Interactive?181578
|
||||
Node: Interactive Shell Behavior182384
|
||||
Node: Bash Conditional Expressions185651
|
||||
Node: Shell Arithmetic189071
|
||||
Node: Aliases191811
|
||||
Node: Arrays194374
|
||||
Node: The Directory Stack197394
|
||||
Node: Directory Stack Builtins198100
|
||||
Node: Printing a Prompt200979
|
||||
Node: The Restricted Shell203688
|
||||
Node: Bash POSIX Mode205513
|
||||
Node: Job Control212159
|
||||
Node: Job Control Basics212625
|
||||
Node: Job Control Builtins216910
|
||||
Node: Job Control Variables221206
|
||||
Node: Command Line Editing222356
|
||||
Node: Introduction and Notation223354
|
||||
Node: Readline Interaction224971
|
||||
Node: Readline Bare Essentials226157
|
||||
Node: Readline Movement Commands227937
|
||||
Node: Readline Killing Commands228893
|
||||
Node: Readline Arguments230802
|
||||
Node: Searching231837
|
||||
Node: Readline Init File234014
|
||||
Node: Readline Init File Syntax235068
|
||||
Node: Conditional Init Constructs246712
|
||||
Node: Sample Init File249236
|
||||
Node: Bindable Readline Commands252419
|
||||
Node: Commands For Moving253618
|
||||
Node: Commands For History254467
|
||||
Node: Commands For Text257356
|
||||
Node: Commands For Killing260017
|
||||
Node: Numeric Arguments262147
|
||||
Node: Commands For Completion263274
|
||||
Node: Keyboard Macros266855
|
||||
Node: Miscellaneous Commands267414
|
||||
Node: Readline vi Mode272713
|
||||
Node: Programmable Completion273622
|
||||
Node: Programmable Completion Builtins279429
|
||||
Node: Using History Interactively286791
|
||||
Node: Bash History Facilities287470
|
||||
Node: Bash History Builtins290160
|
||||
Node: History Interaction294012
|
||||
Node: Event Designators296563
|
||||
Node: Word Designators297567
|
||||
Node: Modifiers299197
|
||||
Node: Installing Bash300594
|
||||
Node: Basic Installation301728
|
||||
Node: Compilers and Options304413
|
||||
Node: Compiling For Multiple Architectures305147
|
||||
Node: Installation Names306804
|
||||
Node: Specifying the System Type307615
|
||||
Node: Sharing Defaults308324
|
||||
Node: Operation Controls308989
|
||||
Node: Optional Features309940
|
||||
Node: Reporting Bugs318212
|
||||
Node: Major Differences From The Bourne Shell319387
|
||||
Node: Copying This Manual335135
|
||||
Node: GNU Free Documentation License335389
|
||||
Node: Builtin Index357782
|
||||
Node: Reserved Word Index361409
|
||||
Node: Variable Index362885
|
||||
Node: Function Index369878
|
||||
Node: Concept Index374491
|
||||
Node: Bourne Shell Builtins93010
|
||||
Node: Bash Builtins109893
|
||||
Node: The Set Builtin138015
|
||||
Node: Special Builtins146233
|
||||
Node: Shell Variables147205
|
||||
Node: Bourne Shell Variables147641
|
||||
Node: Bash Variables149618
|
||||
Node: Bash Features169123
|
||||
Node: Invoking Bash170005
|
||||
Node: Bash Startup Files175816
|
||||
Node: Interactive Shells180686
|
||||
Node: What is an Interactive Shell?181088
|
||||
Node: Is this Shell Interactive?181723
|
||||
Node: Interactive Shell Behavior182529
|
||||
Node: Bash Conditional Expressions185796
|
||||
Node: Shell Arithmetic189216
|
||||
Node: Aliases191956
|
||||
Node: Arrays194519
|
||||
Node: The Directory Stack197539
|
||||
Node: Directory Stack Builtins198245
|
||||
Node: Printing a Prompt201124
|
||||
Node: The Restricted Shell203833
|
||||
Node: Bash POSIX Mode205658
|
||||
Node: Job Control212304
|
||||
Node: Job Control Basics212770
|
||||
Node: Job Control Builtins217055
|
||||
Node: Job Control Variables221351
|
||||
Node: Command Line Editing222501
|
||||
Node: Introduction and Notation223499
|
||||
Node: Readline Interaction225116
|
||||
Node: Readline Bare Essentials226302
|
||||
Node: Readline Movement Commands228082
|
||||
Node: Readline Killing Commands229038
|
||||
Node: Readline Arguments230947
|
||||
Node: Searching231982
|
||||
Node: Readline Init File234159
|
||||
Node: Readline Init File Syntax235213
|
||||
Node: Conditional Init Constructs246857
|
||||
Node: Sample Init File249381
|
||||
Node: Bindable Readline Commands252564
|
||||
Node: Commands For Moving253763
|
||||
Node: Commands For History254612
|
||||
Node: Commands For Text257501
|
||||
Node: Commands For Killing260162
|
||||
Node: Numeric Arguments262292
|
||||
Node: Commands For Completion263419
|
||||
Node: Keyboard Macros267000
|
||||
Node: Miscellaneous Commands267559
|
||||
Node: Readline vi Mode272858
|
||||
Node: Programmable Completion273767
|
||||
Node: Programmable Completion Builtins279574
|
||||
Node: Using History Interactively286936
|
||||
Node: Bash History Facilities287615
|
||||
Node: Bash History Builtins290305
|
||||
Node: History Interaction294157
|
||||
Node: Event Designators296708
|
||||
Node: Word Designators297712
|
||||
Node: Modifiers299342
|
||||
Node: Installing Bash300739
|
||||
Node: Basic Installation301873
|
||||
Node: Compilers and Options304558
|
||||
Node: Compiling For Multiple Architectures305292
|
||||
Node: Installation Names306949
|
||||
Node: Specifying the System Type307760
|
||||
Node: Sharing Defaults308469
|
||||
Node: Operation Controls309134
|
||||
Node: Optional Features310085
|
||||
Node: Reporting Bugs318357
|
||||
Node: Major Differences From The Bourne Shell319532
|
||||
Node: Copying This Manual335280
|
||||
Node: GNU Free Documentation License335534
|
||||
Node: Builtin Index357927
|
||||
Node: Reserved Word Index361554
|
||||
Node: Variable Index363030
|
||||
Node: Function Index370023
|
||||
Node: Concept Index374636
|
||||
|
||||
End Tag Table
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2001.2.12) 20 APR 2004 15:26
|
||||
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2001.2.12) 4 MAY 2004 10:27
|
||||
**/usr/homes/chet/src/bash/src/doc/bashref.texi
|
||||
(/usr/homes/chet/src/bash/src/doc/bashref.texi (texinfo.tex
|
||||
Loading texinfo [version 2003-02-03.16]: Basics,
|
||||
@@ -171,7 +171,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
|
||||
|
||||
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
|
||||
[26] [27] [28] [29] [30] [31] Chapter 4 [32] [33] [34] [35] [36] [37] [38]
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 3098--3111
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 3102--3115
|
||||
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
|
||||
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
|
||||
@@ -184,7 +184,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
.etc.
|
||||
|
||||
[39] [40] [41] [42] [43]
|
||||
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3435--3435
|
||||
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3439--3439
|
||||
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
|
||||
] [-n @textttsl nchars@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl ti
|
||||
me-
|
||||
@@ -198,7 +198,7 @@ me-
|
||||
.etc.
|
||||
|
||||
[44] [45] [46] [47] [48] [49] [50] [51]
|
||||
Underfull \hbox (badness 4036) in paragraph at lines 4044--4051
|
||||
Underfull \hbox (badness 4036) in paragraph at lines 4048--4055
|
||||
@texttt -x[]@textrm Print a trace of sim-ple com-mands, @texttt \@textrm fB-fo
|
||||
r@texttt \@textrm fP com-mands,
|
||||
|
||||
@@ -211,7 +211,7 @@ r@texttt \@textrm fP com-mands,
|
||||
.etc.
|
||||
|
||||
[52] [53] Chapter 5 [54] [55] [56] [57] [58] [59] [60] [61] Chapter 6 [62]
|
||||
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4756--4756
|
||||
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4760--4760
|
||||
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
|
||||
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
|
||||
@@ -224,7 +224,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4757--4757
|
||||
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4761--4761
|
||||
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
|
||||
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
|
||||
-
|
||||
@@ -238,7 +238,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 4757--4757
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4758--4758
|
||||
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4762--4762
|
||||
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
|
||||
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
|
||||
@@ -251,7 +251,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
.etc.
|
||||
|
||||
[63] [64]
|
||||
Underfull \hbox (badness 2245) in paragraph at lines 4932--4934
|
||||
Underfull \hbox (badness 2245) in paragraph at lines 4936--4938
|
||||
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
|
||||
the file
|
||||
|
||||
@@ -318,7 +318,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1742--1745
|
||||
|
||||
[107]) (/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[108] [109] [110] [111] [112]) Chapter 10 [113] [114] [115] [116] [117]
|
||||
Underfull \hbox (badness 2772) in paragraph at lines 6600--6604
|
||||
Underfull \hbox (badness 2772) in paragraph at lines 6604--6608
|
||||
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
|
||||
s/large_
|
||||
|
||||
@@ -363,4 +363,4 @@ Here is how much of TeX's memory you used:
|
||||
19 hyphenation exceptions out of 1000
|
||||
15i,8n,11p,273b,465s stack positions out of 300i,100n,500p,50000b,4000s
|
||||
|
||||
Output written on bashref.dvi (154 pages, 579284 bytes).
|
||||
Output written on bashref.dvi (154 pages, 579456 bytes).
|
||||
|
||||
+39
-35
@@ -8,7 +8,7 @@
|
||||
%DVIPSWebPage: (www.radicaleye.com)
|
||||
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
|
||||
%DVIPSParameters: dpi=600, compressed
|
||||
%DVIPSSource: TeX output 2004.04.20:1526
|
||||
%DVIPSSource: TeX output 2004.05.04:1027
|
||||
%%BeginProcSet: texc.pro
|
||||
%!
|
||||
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
|
||||
@@ -5222,69 +5222,73 @@ eop
|
||||
%%Page: 33 39
|
||||
33 38 bop 150 -116 a Ft(Chapter)30 b(4:)41 b(Shell)28
|
||||
b(Builtin)g(Commands)2069 b(33)150 299 y Fo(4)80 b(Shell)55
|
||||
b(Builtin)g(Commands)275 572 y Ft(Builtin)22 b(commands)i(are)h(con)m
|
||||
b(Builtin)g(Commands)275 525 y Ft(Builtin)22 b(commands)i(are)h(con)m
|
||||
(tained)g(within)d(the)j(shell)e(itself.)38 b(When)24
|
||||
b(the)h(name)g(of)g(a)g(builtin)c(com-)150 681 y(mand)26
|
||||
b(the)h(name)g(of)g(a)g(builtin)c(com-)150 635 y(mand)26
|
||||
b(is)h(used)f(as)i(the)g(\014rst)e(w)m(ord)h(of)h(a)f(simple)f(command)
|
||||
h(\(see)h(Section)f(3.2.1)i([Simple)d(Commands],)150
|
||||
791 y(page)21 b(8\),)j(the)d(shell)e(executes)j(the)f(command)f
|
||||
745 y(page)21 b(8\),)j(the)d(shell)e(executes)j(the)f(command)f
|
||||
(directly)-8 b(,)22 b(without)e(in)m(v)m(oking)g(another)h(program.)37
|
||||
b(Builtin)150 900 y(commands)f(are)h(necessary)g(to)g(implemen)m(t)e
|
||||
b(Builtin)150 854 y(commands)f(are)h(necessary)g(to)g(implemen)m(t)e
|
||||
(functionalit)m(y)g(imp)s(ossible)e(or)k(incon)m(v)m(enien)m(t)f(to)h
|
||||
(obtain)150 1010 y(with)29 b(separate)i(utilities.)275
|
||||
1157 y(This)i(section)i(brie\015y)f(the)h(builtins)d(whic)m(h)i(Bash)h
|
||||
(obtain)150 964 y(with)29 b(separate)i(utilities.)275
|
||||
1097 y(This)i(section)i(brie\015y)f(the)h(builtins)d(whic)m(h)i(Bash)h
|
||||
(inherits)e(from)i(the)g(Bourne)g(Shell,)g(as)g(w)m(ell)g(as)150
|
||||
1267 y(the)c(builtin)26 b(commands)k(whic)m(h)g(are)g(unique)f(to)i(or)
|
||||
f(ha)m(v)m(e)i(b)s(een)e(extended)g(in)f(Bash.)275 1414
|
||||
1206 y(the)c(builtin)26 b(commands)k(whic)m(h)g(are)g(unique)f(to)i(or)
|
||||
f(ha)m(v)m(e)i(b)s(een)e(extended)g(in)f(Bash.)275 1339
|
||||
y(Sev)m(eral)44 b(builtin)c(commands)k(are)h(describ)s(ed)d(in)h(other)
|
||||
h(c)m(hapters:)69 b(builtin)40 b(commands)k(whic)m(h)150
|
||||
1524 y(pro)m(vide)22 b(the)i(Bash)f(in)m(terface)h(to)g(the)g(job)f
|
||||
1449 y(pro)m(vide)22 b(the)i(Bash)f(in)m(terface)h(to)g(the)g(job)f
|
||||
(con)m(trol)h(facilities)d(\(see)j(Section)g(7.2)g([Job)f(Con)m(trol)g
|
||||
(Builtins],)150 1633 y(page)40 b(80\),)j(the)c(directory)g(stac)m(k)h
|
||||
(Builtins],)150 1558 y(page)40 b(80\),)j(the)c(directory)g(stac)m(k)h
|
||||
(\(see)g(Section)f(6.8.1)i([Directory)f(Stac)m(k)g(Builtins],)f(page)h
|
||||
(73\),)j(the)150 1743 y(command)23 b(history)g(\(see)h(Section)f(9.2)i
|
||||
(73\),)j(the)150 1668 y(command)23 b(history)g(\(see)h(Section)f(9.2)i
|
||||
([Bash)f(History)f(Builtins],)f(page)j(109\),)h(and)d(the)h
|
||||
(programmable)150 1853 y(completion)30 b(facilities)e(\(see)k(Section)e
|
||||
(programmable)150 1778 y(completion)30 b(facilities)e(\(see)k(Section)e
|
||||
(8.7)h([Programmable)f(Completion)f(Builtins],)f(page)k(105\).)275
|
||||
2000 y(Man)m(y)f(of)f(the)h(builtins)26 b(ha)m(v)m(e)32
|
||||
b(b)s(een)e(extended)g(b)m(y)g Fl(posix)g Ft(or)g(Bash.)150
|
||||
2290 y Fr(4.1)68 b(Bourne)45 b(Shell)g(Builtins)275 2546
|
||||
1911 y(Man)m(y)f(of)f(the)h(builtins)26 b(ha)m(v)m(e)32
|
||||
b(b)s(een)e(extended)g(b)m(y)g Fl(posix)g Ft(or)g(Bash.)275
|
||||
2044 y(Unless)19 b(otherwise)h(noted,)i(eac)m(h)g(builtin)17
|
||||
b(command)j(do)s(cumen)m(ted)g(as)h(accepting)g(options)e(preceded)150
|
||||
2153 y(b)m(y)30 b(`)p Fs(-)p Ft(')h(accepts)g(`)p Fs(--)p
|
||||
Ft(')g(to)g(signify)d(the)j(end)f(of)g(the)h(options.)150
|
||||
2406 y Fr(4.1)68 b(Bourne)45 b(Shell)g(Builtins)275 2648
|
||||
y Ft(The)31 b(follo)m(wing)f(shell)f(builtin)g(commands)i(are)h
|
||||
(inherited)d(from)i(the)h(Bourne)f(Shell.)43 b(These)31
|
||||
b(com-)150 2656 y(mands)e(are)i(implemen)m(ted)e(as)i(sp)s(eci\014ed)d
|
||||
(b)m(y)j(the)f Fl(posix)g Ft(1003.2)j(standard.)150 2835
|
||||
y Fs(:)d Ft(\(a)h(colon\))870 2944 y Fs(:)47 b([)p Fj(arguments)11
|
||||
b Fs(])630 3085 y Ft(Do)43 b(nothing)e(b)s(ey)m(ond)h(expanding)e
|
||||
b(com-)150 2758 y(mands)e(are)i(implemen)m(ted)e(as)i(sp)s(eci\014ed)d
|
||||
(b)m(y)j(the)f Fl(posix)g Ft(1003.2)j(standard.)150 2914
|
||||
y Fs(:)d Ft(\(a)h(colon\))870 3024 y Fs(:)47 b([)p Fj(arguments)11
|
||||
b Fs(])630 3157 y Ft(Do)43 b(nothing)e(b)s(ey)m(ond)h(expanding)e
|
||||
Fq(argumen)m(ts)46 b Ft(and)c(p)s(erforming)e(redirections.)74
|
||||
b(The)630 3195 y(return)29 b(status)i(is)e(zero.)150
|
||||
3367 y Fs(.)h Ft(\(a)h(p)s(erio)s(d\))870 3477 y Fs(.)47
|
||||
b(The)630 3267 y(return)29 b(status)i(is)e(zero.)150
|
||||
3423 y Fs(.)h Ft(\(a)h(p)s(erio)s(d\))870 3532 y Fs(.)47
|
||||
b Fj(filename)57 b Fs([)p Fj(arguments)11 b Fs(])630
|
||||
3618 y Ft(Read)34 b(and)f(execute)i(commands)e(from)g(the)h
|
||||
3665 y Ft(Read)34 b(and)f(execute)i(commands)e(from)g(the)h
|
||||
Fq(\014lename)k Ft(argumen)m(t)c(in)e(the)i(curren)m(t)g(shell)630
|
||||
3727 y(con)m(text.)45 b(If)31 b Fq(\014lename)36 b Ft(do)s(es)31
|
||||
3775 y(con)m(text.)45 b(If)31 b Fq(\014lename)36 b Ft(do)s(es)31
|
||||
b(not)g(con)m(tain)h(a)f(slash,)g(the)h Fs(PATH)e Ft(v)-5
|
||||
b(ariable)30 b(is)g(used)g(to)i(\014nd)630 3837 y Fq(\014lename)p
|
||||
b(ariable)30 b(is)g(used)g(to)i(\014nd)630 3885 y Fq(\014lename)p
|
||||
Ft(.)51 b(When)34 b(Bash)g(is)g(not)g(in)f Fl(posix)g
|
||||
Ft(mo)s(de,)i(the)g(curren)m(t)f(directory)f(is)g(searc)m(hed)630
|
||||
3946 y(if)d Fq(\014lename)35 b Ft(is)30 b(not)i(found)d(in)h
|
||||
3994 y(if)d Fq(\014lename)35 b Ft(is)30 b(not)i(found)d(in)h
|
||||
Fs($PATH)p Ft(.)41 b(If)31 b(an)m(y)g Fq(argumen)m(ts)k
|
||||
Ft(are)c(supplied,)d(they)k(b)s(ecome)630 4056 y(the)e(p)s(ositional)e
|
||||
Ft(are)c(supplied,)d(they)k(b)s(ecome)630 4104 y(the)e(p)s(ositional)e
|
||||
(parameters)j(when)e Fq(\014lename)34 b Ft(is)29 b(executed.)42
|
||||
b(Otherwise)29 b(the)h(p)s(ositional)630 4166 y(parameters)43
|
||||
b(Otherwise)29 b(the)h(p)s(ositional)630 4213 y(parameters)43
|
||||
b(are)h(unc)m(hanged.)79 b(The)42 b(return)g(status)i(is)e(the)h(exit)g
|
||||
(status)h(of)f(the)g(last)630 4275 y(command)37 b(executed,)k(or)c
|
||||
(status)h(of)f(the)g(last)630 4323 y(command)37 b(executed,)k(or)c
|
||||
(zero)h(if)f(no)g(commands)g(are)h(executed.)63 b(If)36
|
||||
b Fq(\014lename)42 b Ft(is)37 b(not)630 4385 y(found,)22
|
||||
b Fq(\014lename)42 b Ft(is)37 b(not)630 4433 y(found,)22
|
||||
b(or)f(cannot)g(b)s(e)f(read,)j(the)e(return)f(status)h(is)f(non-zero.)
|
||||
38 b(This)19 b(builtin)f(is)h(equiv)-5 b(alen)m(t)630
|
||||
4494 y(to)31 b Fs(source)p Ft(.)150 4667 y Fs(break)870
|
||||
4808 y(break)46 b([)p Fj(n)11 b Fs(])630 4949 y Ft(Exit)44
|
||||
4542 y(to)31 b Fs(source)p Ft(.)150 4699 y Fs(break)870
|
||||
4831 y(break)46 b([)p Fj(n)11 b Fs(])630 4964 y Ft(Exit)44
|
||||
b(from)g(a)g Fs(for)p Ft(,)k Fs(while)p Ft(,)e Fs(until)p
|
||||
Ft(,)h(or)d Fs(select)f Ft(lo)s(op.)82 b(If)44 b Fq(n)g
|
||||
Ft(is)f(supplied,)i(the)g Fq(n)p Ft(th)630 5058 y(enclosing)39
|
||||
Ft(is)f(supplied,)i(the)g Fq(n)p Ft(th)630 5074 y(enclosing)39
|
||||
b(lo)s(op)g(is)h(exited.)69 b Fq(n)40 b Ft(m)m(ust)g(b)s(e)f(greater)j
|
||||
(than)d(or)i(equal)e(to)i(1.)70 b(The)40 b(return)630
|
||||
5168 y(status)31 b(is)e(zero)i(unless)e Fq(n)h Ft(is)f(not)i(greater)g
|
||||
5184 y(status)31 b(is)e(zero)i(unless)e Fq(n)h Ft(is)f(not)i(greater)g
|
||||
(than)g(or)f(equal)g(to)h(1.)150 5340 y Fs(cd)p eop
|
||||
%%Page: 34 40
|
||||
34 39 bop 150 -116 a Ft(34)2572 b(Bash)31 b(Reference)g(Man)m(ual)870
|
||||
@@ -9947,7 +9951,7 @@ Fs(edit-and-execute-command)24 b(\(C-xC-e\))630 1906
|
||||
y Ft(In)m(v)m(ok)m(e)34 b(an)f(editor)f(on)h(the)g(curren)m(t)f
|
||||
(command)h(line,)f(and)g(execute)i(the)f(result)f(as)h(shell)630
|
||||
2016 y(commands.)81 b(Bash)44 b(attempts)h(to)g(in)m(v)m(ok)m(e)g
|
||||
Fs($FCEDIT)p Ft(,)g Fs($EDITOR)p Ft(,)h(and)d Fs(emacs)g
|
||||
Fs($VISUAL)p Ft(,)g Fs($EDITOR)p Ft(,)h(and)d Fs(emacs)g
|
||||
Ft(as)h(the)630 2125 y(editor,)30 b(in)f(that)i(order.)150
|
||||
2363 y Fr(8.5)68 b(Readline)47 b(vi)e(Mo)t(de)275 2600
|
||||
y Ft(While)22 b(the)i(Readline)e(library)f(do)s(es)j(not)g(ha)m(v)m(e)g
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* rlprivate.h -- functions and variables global to the readline library,
|
||||
but not intended for use by applications. */
|
||||
|
||||
/* Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
@@ -282,4 +282,7 @@ extern int _rl_term_autowrap;
|
||||
extern int _rl_doing_an_undo;
|
||||
extern int _rl_undo_group_level;
|
||||
|
||||
/* vi_mode.c */
|
||||
extern int _rl_vi_last_command;
|
||||
|
||||
#endif /* _RL_PRIVATE_H_ */
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
/* rlprivate.h -- functions and variables global to the readline library,
|
||||
but not intended for use by applications. */
|
||||
|
||||
/* Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library 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.
|
||||
|
||||
The GNU Readline Library 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.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
|
||||
#if !defined (_RL_PRIVATE_H_)
|
||||
#define _RL_PRIVATE_H_
|
||||
|
||||
#include "rlconf.h" /* for VISIBLE_STATS */
|
||||
#include "rlstdc.h"
|
||||
#include "posixjmp.h" /* defines procenv_t */
|
||||
|
||||
/*************************************************************************
|
||||
* *
|
||||
* Global functions undocumented in texinfo manual and not in readline.h *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
* *
|
||||
* Global variables undocumented in texinfo manual and not in readline.h *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/* complete.c */
|
||||
extern int rl_complete_with_tilde_expansion;
|
||||
#if defined (VISIBLE_STATS)
|
||||
extern int rl_visible_stats;
|
||||
#endif /* VISIBLE_STATS */
|
||||
|
||||
/* readline.c */
|
||||
extern int rl_line_buffer_len;
|
||||
extern int rl_arg_sign;
|
||||
extern int rl_visible_prompt_length;
|
||||
extern int readline_echoing_p;
|
||||
extern int rl_key_sequence_length;
|
||||
extern int rl_byte_oriented;
|
||||
|
||||
/* display.c */
|
||||
extern int rl_display_fixed;
|
||||
|
||||
/* parens.c */
|
||||
extern int rl_blink_matching_paren;
|
||||
|
||||
/*************************************************************************
|
||||
* *
|
||||
* Global functions and variables unsed and undocumented *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/* kill.c */
|
||||
extern int rl_set_retained_kills PARAMS((int));
|
||||
|
||||
/* terminal.c */
|
||||
extern void _rl_set_screen_size PARAMS((int, int));
|
||||
|
||||
/* undo.c */
|
||||
extern int _rl_fix_last_undo_of_type PARAMS((int, int, int));
|
||||
|
||||
/* util.c */
|
||||
extern char *_rl_savestring PARAMS((const char *));
|
||||
|
||||
/*************************************************************************
|
||||
* *
|
||||
* Functions and variables private to the readline library *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/* NOTE: Functions and variables prefixed with `_rl_' are
|
||||
pseudo-global: they are global so they can be shared
|
||||
between files in the readline library, but are not intended
|
||||
to be visible to readline callers. */
|
||||
|
||||
/*************************************************************************
|
||||
* Undocumented private functions *
|
||||
*************************************************************************/
|
||||
|
||||
#if defined(READLINE_CALLBACKS)
|
||||
|
||||
/* readline.c */
|
||||
extern void readline_internal_setup PARAMS((void));
|
||||
extern char *readline_internal_teardown PARAMS((int));
|
||||
extern int readline_internal_char PARAMS((void));
|
||||
|
||||
#endif /* READLINE_CALLBACKS */
|
||||
|
||||
/* bind.c */
|
||||
|
||||
/* complete.c */
|
||||
extern char _rl_find_completion_word PARAMS((int *, int *));
|
||||
extern void _rl_free_match_list PARAMS((char **));
|
||||
|
||||
/* display.c */
|
||||
extern char *_rl_strip_prompt PARAMS((char *));
|
||||
extern void _rl_move_cursor_relative PARAMS((int, const char *));
|
||||
extern void _rl_move_vert PARAMS((int));
|
||||
extern void _rl_save_prompt PARAMS((void));
|
||||
extern void _rl_restore_prompt PARAMS((void));
|
||||
extern char *_rl_make_prompt_for_search PARAMS((int));
|
||||
extern void _rl_erase_at_end_of_line PARAMS((int));
|
||||
extern void _rl_clear_to_eol PARAMS((int));
|
||||
extern void _rl_clear_screen PARAMS((void));
|
||||
extern void _rl_update_final PARAMS((void));
|
||||
extern void _rl_redisplay_after_sigwinch PARAMS((void));
|
||||
extern void _rl_clean_up_for_exit PARAMS((void));
|
||||
extern void _rl_erase_entire_line PARAMS((void));
|
||||
extern int _rl_current_display_line PARAMS((void));
|
||||
|
||||
/* input.c */
|
||||
extern int _rl_any_typein PARAMS((void));
|
||||
extern int _rl_input_available PARAMS((void));
|
||||
extern int _rl_input_queued PARAMS((int));
|
||||
extern void _rl_insert_typein PARAMS((int));
|
||||
extern int _rl_unget_char PARAMS((int));
|
||||
extern int _rl_pushed_input_available PARAMS((void));
|
||||
|
||||
/* macro.c */
|
||||
extern void _rl_with_macro_input PARAMS((char *));
|
||||
extern int _rl_next_macro_key PARAMS((void));
|
||||
extern void _rl_push_executing_macro PARAMS((void));
|
||||
extern void _rl_pop_executing_macro PARAMS((void));
|
||||
extern void _rl_add_macro_char PARAMS((int));
|
||||
extern void _rl_kill_kbd_macro PARAMS((void));
|
||||
|
||||
/* misc.c */
|
||||
extern int _rl_init_argument PARAMS((void));
|
||||
extern void _rl_start_using_history PARAMS((void));
|
||||
extern int _rl_free_saved_history_line PARAMS((void));
|
||||
extern void _rl_set_insert_mode PARAMS((int, int));
|
||||
|
||||
/* nls.c */
|
||||
extern int _rl_init_eightbit PARAMS((void));
|
||||
|
||||
/* parens.c */
|
||||
extern void _rl_enable_paren_matching PARAMS((int));
|
||||
|
||||
/* readline.c */
|
||||
extern void _rl_init_line_state PARAMS((void));
|
||||
extern void _rl_set_the_line PARAMS((void));
|
||||
extern int _rl_dispatch PARAMS((int, Keymap));
|
||||
extern int _rl_dispatch_subseq PARAMS((int, Keymap, int));
|
||||
|
||||
/* rltty.c */
|
||||
extern int _rl_disable_tty_signals PARAMS((void));
|
||||
extern int _rl_restore_tty_signals PARAMS((void));
|
||||
|
||||
/* terminal.c */
|
||||
extern void _rl_get_screen_size PARAMS((int, int));
|
||||
extern int _rl_init_terminal_io PARAMS((const char *));
|
||||
#ifdef _MINIX
|
||||
extern void _rl_output_character_function PARAMS((int));
|
||||
#else
|
||||
extern int _rl_output_character_function PARAMS((int));
|
||||
#endif
|
||||
extern void _rl_output_some_chars PARAMS((const char *, int));
|
||||
extern int _rl_backspace PARAMS((int));
|
||||
extern void _rl_enable_meta_key PARAMS((void));
|
||||
extern void _rl_control_keypad PARAMS((int));
|
||||
extern void _rl_set_cursor PARAMS((int, int));
|
||||
|
||||
/* text.c */
|
||||
extern void _rl_fix_point PARAMS((int));
|
||||
extern int _rl_replace_text PARAMS((const char *, int, int));
|
||||
extern int _rl_insert_char PARAMS((int, int));
|
||||
extern int _rl_overwrite_char PARAMS((int, int));
|
||||
extern int _rl_overwrite_rubout PARAMS((int, int));
|
||||
extern int _rl_rubout_char PARAMS((int, int));
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
extern int _rl_char_search_internal PARAMS((int, int, char *, int));
|
||||
#else
|
||||
extern int _rl_char_search_internal PARAMS((int, int, int));
|
||||
#endif
|
||||
extern int _rl_set_mark_at_pos PARAMS((int));
|
||||
|
||||
/* util.c */
|
||||
extern int _rl_abort_internal PARAMS((void));
|
||||
extern char *_rl_strindex PARAMS((const char *, const char *));
|
||||
extern int _rl_qsort_string_compare PARAMS((char **, char **));
|
||||
extern int (_rl_uppercase_p) PARAMS((int));
|
||||
extern int (_rl_lowercase_p) PARAMS((int));
|
||||
extern int (_rl_pure_alphabetic) PARAMS((int));
|
||||
extern int (_rl_digit_p) PARAMS((int));
|
||||
extern int (_rl_to_lower) PARAMS((int));
|
||||
extern int (_rl_to_upper) PARAMS((int));
|
||||
extern int (_rl_digit_value) PARAMS((int));
|
||||
|
||||
/* vi_mode.c */
|
||||
extern void _rl_vi_initialize_line PARAMS((void));
|
||||
extern void _rl_vi_reset_last PARAMS((int));
|
||||
extern void _rl_vi_set_last PARAMS((int, int, int));
|
||||
extern int _rl_vi_textmod_command PARAMS((int));
|
||||
extern void _rl_vi_done_inserting PARAMS((void));
|
||||
|
||||
/*************************************************************************
|
||||
* Undocumented private variables *
|
||||
*************************************************************************/
|
||||
|
||||
/* bind.c */
|
||||
extern const char *_rl_possible_control_prefixes[];
|
||||
extern const char *_rl_possible_meta_prefixes[];
|
||||
|
||||
/* complete.c */
|
||||
extern int _rl_complete_show_all;
|
||||
extern int _rl_complete_show_unmodified;
|
||||
extern int _rl_complete_mark_directories;
|
||||
extern int _rl_complete_mark_symlink_dirs;
|
||||
extern int _rl_print_completions_horizontally;
|
||||
extern int _rl_completion_case_fold;
|
||||
extern int _rl_match_hidden_files;
|
||||
extern int _rl_page_completions;
|
||||
|
||||
/* display.c */
|
||||
extern int _rl_vis_botlin;
|
||||
extern int _rl_last_c_pos;
|
||||
extern int _rl_suppress_redisplay;
|
||||
extern char *rl_display_prompt;
|
||||
|
||||
/* isearch.c */
|
||||
extern char *_rl_isearch_terminators;
|
||||
|
||||
/* macro.c */
|
||||
extern char *_rl_executing_macro;
|
||||
|
||||
/* misc.c */
|
||||
extern int _rl_history_preserve_point;
|
||||
extern int _rl_history_saved_point;
|
||||
|
||||
/* readline.c */
|
||||
extern int _rl_horizontal_scroll_mode;
|
||||
extern int _rl_mark_modified_lines;
|
||||
extern int _rl_bell_preference;
|
||||
extern int _rl_meta_flag;
|
||||
extern int _rl_convert_meta_chars_to_ascii;
|
||||
extern int _rl_output_meta_chars;
|
||||
extern char *_rl_comment_begin;
|
||||
extern unsigned char _rl_parsing_conditionalized_out;
|
||||
extern Keymap _rl_keymap;
|
||||
extern FILE *_rl_in_stream;
|
||||
extern FILE *_rl_out_stream;
|
||||
extern int _rl_last_command_was_kill;
|
||||
extern int _rl_eof_char;
|
||||
extern procenv_t readline_top_level;
|
||||
|
||||
/* terminal.c */
|
||||
extern int _rl_enable_keypad;
|
||||
extern int _rl_enable_meta;
|
||||
extern char *_rl_term_clreol;
|
||||
extern char *_rl_term_clrpag;
|
||||
extern char *_rl_term_im;
|
||||
extern char *_rl_term_ic;
|
||||
extern char *_rl_term_ei;
|
||||
extern char *_rl_term_DC;
|
||||
extern char *_rl_term_up;
|
||||
extern char *_rl_term_dc;
|
||||
extern char *_rl_term_cr;
|
||||
extern char *_rl_term_IC;
|
||||
extern int _rl_screenheight;
|
||||
extern int _rl_screenwidth;
|
||||
extern int _rl_screenchars;
|
||||
extern int _rl_terminal_can_insert;
|
||||
extern int _rl_term_autowrap;
|
||||
|
||||
/* undo.c */
|
||||
extern int _rl_doing_an_undo;
|
||||
extern int _rl_undo_group_level;
|
||||
|
||||
/* vi_mode.c */
|
||||
extern int _rl_vi_last_command;
|
||||
|
||||
#endif /* _RL_PRIVATE_H_ */
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
/* text.c -- text handling commands for readline. */
|
||||
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
@@ -880,7 +880,8 @@ rl_newline (count, key)
|
||||
if (rl_editing_mode == vi_mode)
|
||||
{
|
||||
_rl_vi_done_inserting ();
|
||||
_rl_vi_reset_last ();
|
||||
if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */
|
||||
_rl_vi_reset_last ();
|
||||
}
|
||||
#endif /* VI_MODE */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/* vi_mode.c -- A vi emulation mode for Bash.
|
||||
Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */
|
||||
|
||||
/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
@@ -63,6 +63,8 @@
|
||||
#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0)
|
||||
#endif
|
||||
|
||||
int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
|
||||
|
||||
/* Non-zero means enter insertion mode. */
|
||||
static int _rl_vi_doing_insert;
|
||||
|
||||
@@ -83,7 +85,6 @@ static int vi_continued_command;
|
||||
static char *vi_insert_buffer;
|
||||
static int vi_insert_buffer_size;
|
||||
|
||||
static int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
|
||||
static int _rl_vi_last_repeat = 1;
|
||||
static int _rl_vi_last_arg_sign = 1;
|
||||
static int _rl_vi_last_motion;
|
||||
@@ -820,6 +821,7 @@ rl_vi_domove (key, nextkey)
|
||||
{
|
||||
save = rl_numeric_arg;
|
||||
rl_numeric_arg = _rl_digit_value (c);
|
||||
rl_explicit_arg = 1;
|
||||
rl_digit_loop1 ();
|
||||
rl_numeric_arg *= save;
|
||||
RL_SETSTATE(RL_STATE_MOREINPUT);
|
||||
|
||||
@@ -63,6 +63,8 @@
|
||||
#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0)
|
||||
#endif
|
||||
|
||||
int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
|
||||
|
||||
/* Non-zero means enter insertion mode. */
|
||||
static int _rl_vi_doing_insert;
|
||||
|
||||
@@ -83,7 +85,6 @@ static int vi_continued_command;
|
||||
static char *vi_insert_buffer;
|
||||
static int vi_insert_buffer_size;
|
||||
|
||||
static int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
|
||||
static int _rl_vi_last_repeat = 1;
|
||||
static int _rl_vi_last_arg_sign = 1;
|
||||
static int _rl_vi_last_motion;
|
||||
@@ -820,6 +821,7 @@ rl_vi_domove (key, nextkey)
|
||||
{
|
||||
save = rl_numeric_arg;
|
||||
rl_numeric_arg = _rl_digit_value (c);
|
||||
rl_explicit_arg = 1;
|
||||
rl_digit_loop1 ();
|
||||
rl_numeric_arg *= save;
|
||||
RL_SETSTATE(RL_STATE_MOREINPUT);
|
||||
@@ -1018,7 +1020,7 @@ rl_vi_change_to (count, key)
|
||||
/* `C' does not save the text inserted for undoing or redoing. */
|
||||
if (_rl_uppercase_p (key) == 0)
|
||||
_rl_vi_doing_insert = 1;
|
||||
_rl_vi_set_last (key, count, rl_arg_sign);
|
||||
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
|
||||
rl_vi_insertion_mode (1, key);
|
||||
}
|
||||
|
||||
|
||||
@@ -4010,7 +4010,11 @@ decode_prompt_string (string)
|
||||
else if (c == 'A')
|
||||
n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm);
|
||||
|
||||
timebuf[sizeof(timebuf) - 1] = '\0';
|
||||
if (n == 0)
|
||||
timebuf[0] = '\0';
|
||||
else
|
||||
timebuf[sizeof(timebuf) - 1] = '\0';
|
||||
|
||||
temp = savestring (timebuf);
|
||||
goto add_string;
|
||||
|
||||
@@ -4035,7 +4039,11 @@ decode_prompt_string (string)
|
||||
n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
|
||||
free (timefmt);
|
||||
|
||||
timebuf[sizeof(timebuf) - 1] = '\0';
|
||||
if (n == 0)
|
||||
timebuf[0] = '\0';
|
||||
else
|
||||
timebuf[sizeof(timebuf) - 1] = '\0';
|
||||
|
||||
if (promptvars || posixly_correct)
|
||||
/* Make sure that expand_prompt_string is called with a
|
||||
second argument of Q_DOUBLE_QUOTES if we use this
|
||||
|
||||
Binary file not shown.
+6
-6
@@ -163,7 +163,7 @@ msgstr "HOME not set"
|
||||
msgid "OLDPWD not set"
|
||||
msgstr "OLDPWD not set"
|
||||
|
||||
#: builtins/cd.def:350
|
||||
#: builtins/cd.def:357
|
||||
#, c-format
|
||||
msgid "write error: %s"
|
||||
msgstr "write error: %s"
|
||||
@@ -264,12 +264,12 @@ msgstr "restricted"
|
||||
msgid "%s: not a shell builtin"
|
||||
msgstr "%s: not a shell builtin"
|
||||
|
||||
#: builtins/common.c:481
|
||||
#, c-format
|
||||
msgid "%s: could not get current directory: %s: %s\n"
|
||||
#: builtins/common.c:486
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: error retrieving current directory: %s: %s\n"
|
||||
msgstr "%s: could not get current directory: %s: %s\n"
|
||||
|
||||
#: builtins/common.c:548 builtins/common.c:550
|
||||
#: builtins/common.c:553 builtins/common.c:555
|
||||
#, c-format
|
||||
msgid "%s: ambiguous job spec"
|
||||
msgstr "%s: ambiguous job spec"
|
||||
@@ -453,7 +453,7 @@ msgstr "history position"
|
||||
msgid "%s: history expansion failed"
|
||||
msgstr "%s: history expansion failed"
|
||||
|
||||
#: builtins/jobs.def:102
|
||||
#: builtins/jobs.def:99
|
||||
msgid "no other options allowed with `-x'"
|
||||
msgstr "no other options allowed with ‘[1m-x[0m’"
|
||||
|
||||
|
||||
Binary file not shown.
+6
-6
@@ -160,7 +160,7 @@ msgstr "HOME not set"
|
||||
msgid "OLDPWD not set"
|
||||
msgstr "OLDPWD not set"
|
||||
|
||||
#: builtins/cd.def:350
|
||||
#: builtins/cd.def:357
|
||||
#, c-format
|
||||
msgid "write error: %s"
|
||||
msgstr "write error: %s"
|
||||
@@ -261,12 +261,12 @@ msgstr "restricted"
|
||||
msgid "%s: not a shell builtin"
|
||||
msgstr "%s: not a shell builtin"
|
||||
|
||||
#: builtins/common.c:481
|
||||
#, c-format
|
||||
msgid "%s: could not get current directory: %s: %s\n"
|
||||
#: builtins/common.c:486
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: error retrieving current directory: %s: %s\n"
|
||||
msgstr "%s: could not get current directory: %s: %s\n"
|
||||
|
||||
#: builtins/common.c:548 builtins/common.c:550
|
||||
#: builtins/common.c:553 builtins/common.c:555
|
||||
#, c-format
|
||||
msgid "%s: ambiguous job spec"
|
||||
msgstr "%s: ambiguous job spec"
|
||||
@@ -447,7 +447,7 @@ msgstr "history position"
|
||||
msgid "%s: history expansion failed"
|
||||
msgstr "%s: history expansion failed"
|
||||
|
||||
#: builtins/jobs.def:102
|
||||
#: builtins/jobs.def:99
|
||||
msgid "no other options allowed with `-x'"
|
||||
msgstr "no other options allowed with ‘-x’"
|
||||
|
||||
|
||||
+23
-15
@@ -16,20 +16,28 @@ Waiting for job 6
|
||||
job 6 returns 0
|
||||
Waiting for job 7
|
||||
job 7 returns 0
|
||||
[1] Running sleep 5 &
|
||||
[2] Running sleep 5 &
|
||||
[3] Running sleep 5 &
|
||||
[4]- Running sleep 5 &
|
||||
[5]+ Running ( sleep 5; exit 4 ) &
|
||||
4
|
||||
0
|
||||
./jobs.tests: line 15: wait: %1: no such job
|
||||
./jobs.tests: line 20: fg: no job control
|
||||
i killed it
|
||||
0
|
||||
./jobs.tests: line 19: wait: %1: no such job
|
||||
./jobs.tests: line 24: fg: no job control
|
||||
wait-for-pid
|
||||
wait-errors
|
||||
./jobs.tests: line 33: wait: `1-1': not a pid or valid job spec
|
||||
./jobs.tests: line 34: wait: `-4': not a pid or valid job spec
|
||||
./jobs.tests: line 37: wait: `1-1': not a pid or valid job spec
|
||||
./jobs.tests: line 38: wait: `-4': not a pid or valid job spec
|
||||
wait-for-background-pids
|
||||
async list wait-for-background-pids
|
||||
async list wait for child
|
||||
forked
|
||||
wait-when-no-children
|
||||
wait-for-job
|
||||
./jobs.tests: line 56: wait: %2: no such job
|
||||
./jobs.tests: line 60: wait: %2: no such job
|
||||
127
|
||||
async list wait-for-job
|
||||
forked
|
||||
@@ -42,19 +50,19 @@ sleep 5
|
||||
fg-bg 4
|
||||
sleep 5
|
||||
fg-bg 5
|
||||
./jobs.tests: line 83: fg: %2: no such job
|
||||
./jobs.tests: line 84: bg: job 1 already in background
|
||||
./jobs.tests: line 87: fg: %2: no such job
|
||||
./jobs.tests: line 88: bg: job 1 already in background
|
||||
fg-bg 6
|
||||
./jobs.tests: line 91: fg: -s: invalid option
|
||||
./jobs.tests: line 95: fg: -s: invalid option
|
||||
fg: usage: fg [job_spec]
|
||||
./jobs.tests: line 92: bg: -s: invalid option
|
||||
./jobs.tests: line 96: bg: -s: invalid option
|
||||
bg: usage: bg [job_spec]
|
||||
./jobs.tests: line 97: disown: -s: invalid option
|
||||
./jobs.tests: line 101: disown: -s: invalid option
|
||||
disown: usage: disown [-h] [-ar] [jobspec ...]
|
||||
./jobs.tests: line 101: disown: %1: no such job
|
||||
./jobs.tests: line 104: disown: %2: no such job
|
||||
./jobs.tests: line 105: disown: %1: no such job
|
||||
./jobs.tests: line 108: disown: %2: no such job
|
||||
wait-for-non-child
|
||||
./jobs.tests: line 107: wait: pid 1 is not a child of this shell
|
||||
./jobs.tests: line 111: wait: pid 1 is not a child of this shell
|
||||
127
|
||||
3 -- 1 2 3 -- 1 - 2 - 3
|
||||
[1] Running sleep 300 &
|
||||
@@ -64,8 +72,8 @@ running jobs:
|
||||
[1] Running sleep 300 &
|
||||
[2]- Running sleep 350 &
|
||||
[3]+ Running sleep 400 &
|
||||
./jobs.tests: line 123: kill: %4: no such job
|
||||
./jobs.tests: line 125: jobs: %4: no such job
|
||||
./jobs.tests: line 127: kill: %4: no such job
|
||||
./jobs.tests: line 129: jobs: %4: no such job
|
||||
current job:
|
||||
[3]+ Running sleep 400 &
|
||||
previous job:
|
||||
|
||||
@@ -8,6 +8,10 @@ ${THIS_SH} ./jobs2.sub
|
||||
# before 2.03
|
||||
${THIS_SH} ./jobs3.sub
|
||||
|
||||
# test out behavior of using job control notation when job control is not
|
||||
# active
|
||||
${THIS_SH} ./jobs4.sub
|
||||
|
||||
jobs
|
||||
echo $?
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# test being able to use job control notation in jobs/kill/wait without
|
||||
# job control active, as the SUS requires
|
||||
|
||||
sleep 5 &
|
||||
|
||||
sleep 5 &
|
||||
sleep 5 &
|
||||
sleep 5 &
|
||||
(sleep 5 ; exit 4) &
|
||||
|
||||
jobs
|
||||
|
||||
wait %%
|
||||
echo $?
|
||||
|
||||
wait %1
|
||||
echo $?
|
||||
|
||||
wait
|
||||
|
||||
cat &
|
||||
kill -1 %% && echo i killed it || echo could not kill it
|
||||
+2
-1
@@ -1663,8 +1663,9 @@ make_local_array_variable (name)
|
||||
ARRAY *array;
|
||||
|
||||
var = make_local_variable (name);
|
||||
if (var == 0)
|
||||
if (var == 0 || array_p (var))
|
||||
return var;
|
||||
|
||||
array = array_create ();
|
||||
|
||||
FREE (value_cell(var));
|
||||
|
||||
Reference in New Issue
Block a user