Bash-4.4 distribution sources and documentation
This commit is contained in:
parent
30a978b7d8
commit
a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions
|
|
@ -1,7 +1,7 @@
|
|||
This file is fc.def, from which is created fc.c.
|
||||
It implements the builtin "fc" in Bash.
|
||||
|
||||
Copyright (C) 1987-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2015 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
|
@ -158,6 +158,12 @@ static char *fc_readline __P((FILE *));
|
|||
static void fc_addhist __P((char *));
|
||||
#endif
|
||||
|
||||
static void
|
||||
set_verbose_flag ()
|
||||
{
|
||||
echo_input_at_read = verbose_flag;
|
||||
}
|
||||
|
||||
/* String to execute on a file that we want to edit. */
|
||||
#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}"
|
||||
#if defined (STRICT_POSIX)
|
||||
|
|
@ -212,6 +218,7 @@ fc_builtin (list)
|
|||
ename = list_optarg;
|
||||
break;
|
||||
|
||||
CASE_HELPOPT;
|
||||
default:
|
||||
builtin_usage ();
|
||||
return (EX_USAGE);
|
||||
|
|
@ -440,6 +447,13 @@ fc_builtin (list)
|
|||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
#if defined (READLINE)
|
||||
/* If we're executing as part of a dispatched readline commnand like
|
||||
{emacs,vi}_edit_and_execute_command, the readline state will indicate it.
|
||||
We could remove the partial command from the history, but ksh93 doesn't
|
||||
so we stay compatible. */
|
||||
#endif
|
||||
|
||||
/* Make sure parse_and_execute doesn't turn this off, even though a
|
||||
call to parse_and_execute farther up the function call stack (e.g.,
|
||||
if this is called by vi_edit_and_execute_command) may have already
|
||||
|
|
@ -451,11 +465,10 @@ fc_builtin (list)
|
|||
begin_unwind_frame ("fc builtin");
|
||||
add_unwind_protect ((Function *)xfree, fn);
|
||||
add_unwind_protect (unlink, fn);
|
||||
unwind_protect_int (echo_input_at_read);
|
||||
add_unwind_protect (set_verbose_flag, (char *)NULL);
|
||||
echo_input_at_read = 1;
|
||||
|
||||
retval = fc_execute_file (fn);
|
||||
|
||||
retval = fc_execute_file (fn);
|
||||
run_unwind_frame ("fc builtin");
|
||||
|
||||
return (retval);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue