/* reprompt - reset bash prompt */
/*
Copyright (C) 2014-2020 Dominik Kummer
This file is part of GNU Arkades.
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 3 of the License, 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. If not, see .
*/
#include "config.h"
#if defined (HAVE_UNISTD_H)
# include
#endif
#include
#include "builtins.h"
#include "shell.h"
#include "readline/readline.h"
#include "readline/rlprivate.h"
#include "common.h"
#include "bashgetopt.h"
int
reprompt_builtin (list)
WORD_LIST *list;
{
rl_set_prompt (list->word->word);
return (EXECUTION_SUCCESS);
}
// int
// reprompt_builtin_load (s)
// char *s;
// {
// printf ("reprompt builtin loaded\n");
// fflush (stdout);
// return (1);
// }
char *reprompt_doc[] = {
"Parse commands from stdin.",
"",
(char *)NULL
};
/* The standard structure describing a builtin command. bash keeps an array
of these structures. */
struct builtin reprompt_struct = {
"reprompt", /* builtin name */
reprompt_builtin, /* function implementing the builtin */
BUILTIN_ENABLED, /* initial flags for builtin */
reprompt_doc, /* array of long documentation strings. */
"reprompt reading from stdin", /* usage synopsis */
0 /* reserved for internal use */
};