summaryrefslogtreecommitdiff
path: root/shells/bash/files
diff options
context:
space:
mode:
Diffstat (limited to 'shells/bash/files')
-rw-r--r--shells/bash/files/extrapatch-implicitcd95
-rw-r--r--shells/bash/files/extrapatch-import-functions66
-rw-r--r--shells/bash/files/patch-config-top.h6
-rw-r--r--shells/bash/files/patch-doc_Makefile.in14
-rw-r--r--shells/bash/files/patch-doc_bash.18
-rw-r--r--shells/bash/files/patch-doc_bashref.texi8
-rw-r--r--shells/bash/files/patch-lib_readline_display.c10
7 files changed, 24 insertions, 183 deletions
diff --git a/shells/bash/files/extrapatch-implicitcd b/shells/bash/files/extrapatch-implicitcd
deleted file mode 100644
index c5a25a2a7603..000000000000
--- a/shells/bash/files/extrapatch-implicitcd
+++ /dev/null
@@ -1,95 +0,0 @@
---- execute_cmd.c.orig 2014-03-02 13:15:12.000000000 -0500
-+++ execute_cmd.c 2014-03-02 13:17:14.000000000 -0500
-@@ -199,6 +199,9 @@
-
- static int execute_intern_function __P((WORD_DESC *, FUNCTION_DEF *));
-
-+/* add an implicit `cd' if the command is the name of a directory */
-+int implicitcd = 0;
-+
- /* Set to 1 if fd 0 was the subject of redirection to a subshell. Global
- so that reader_loop can set it to zero before executing a command. */
- int stdin_redir;
-@@ -4111,6 +4114,20 @@
-
- QUIT;
-
-+ if (implicitcd && interactive_shell && words->next == NULL && func == 0 && builtin == 0)
-+ {
-+ struct stat finfo;
-+
-+ if ((stat (words->word->word, &finfo) == 0) && (S_ISDIR (finfo.st_mode)))
-+ {
-+ this_command_name = "cd";
-+ last_shell_builtin = this_shell_builtin;
-+ this_shell_builtin = builtin_address (this_command_name);
-+ result = (*this_shell_builtin) (words);
-+ goto return_result;
-+ }
-+ }
-+
- /* This command could be a shell builtin or a user-defined function.
- We have already found special builtins by this time, so we do not
- set builtin_is_special. If this is a function or builtin, and we
---- builtins/shopt.def.orig 2014-03-02 13:18:07.000000000 -0500
-+++ builtins/shopt.def 2014-03-02 13:19:22.000000000 -0500
-@@ -83,6 +83,7 @@
- extern int check_window_size;
- extern int glob_ignore_case, match_ignore_case;
- extern int hup_on_exit;
-+extern int implicitcd;
- extern int xpg_echo;
- extern int gnu_error_format;
- extern int check_jobs_at_exit;
-@@ -192,6 +193,7 @@
- { "hostcomplete", &perform_hostname_completion, shopt_enable_hostname_completion },
- #endif
- { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL },
-+ { "implicitcd", &implicitcd, (shopt_set_func_t *)NULL },
- { "interactive_comments", &interactive_comments, set_shellopts_after_change },
- { "lastpipe", &lastpipe_opt, (shopt_set_func_t *)NULL },
- #if defined (HISTORY)
-@@ -305,6 +307,7 @@
- cdable_vars = mail_warning = 0;
- no_exit_on_failed_exec = print_shift_error = 0;
- check_hashed_filenames = cdspelling = expand_aliases = 0;
-+ implicitcd = 0;
-
- source_uses_path = promptvars = 1;
-
---- doc/bash.1.orig 2014-03-02 13:19:59.000000000 -0500
-+++ doc/bash.1 2014-03-02 13:21:10.000000000 -0500
-@@ -9480,6 +9480,15 @@
- .B SIGHUP
- to all jobs when an interactive login shell exits.
- .TP 8
-+.B implicitcd
-+If this is set, a directory name typed as a command is treated as a
-+request to change to that directory.
-+This behavior is inhibited in non-interactive mode or for command
-+strings with more than one word.
-+Changing directory takes precedence over executing a like-named
-+command, but it is done after alias substitutions.
-+Tilde and variable expansions work as expected.
-+.TP 8
- .B interactive_comments
- If set, allow a word beginning with
- .B #
---- doc/bashref.texi.orig 2014-03-02 13:21:54.000000000 -0500
-+++ doc/bashref.texi 2014-03-02 13:22:31.000000000 -0500
-@@ -5118,6 +5118,15 @@
- If set, Bash will send @code{SIGHUP} to all jobs when an interactive
- login shell exits (@pxref{Signals}).
-
-+@item implicitcd
-+If this is set, a directory name typed as a command is treated as a
-+request to change to that directory.
-+This behavior is inhibited in non-interactive mode or for command
-+strings with more than one word.
-+Changing directory takes precedence over executing a like-named
-+command, but it is done after alias substitutions.
-+Tilde and variable expansions work as expected.
-+
- @item interactive_comments
- Allow a word beginning with @samp{#}
- to cause that word and all remaining characters on that
diff --git a/shells/bash/files/extrapatch-import-functions b/shells/bash/files/extrapatch-import-functions
deleted file mode 100644
index c1ff0dd0f2f0..000000000000
--- a/shells/bash/files/extrapatch-import-functions
+++ /dev/null
@@ -1,66 +0,0 @@
-Based on christos@NetBSD's patch
-
---- shell.c.christos 2014-01-14 08:04:32.000000000 -0500
-+++ shell.c 2014-09-25 16:11:51.000000000 -0400
-@@ -229,6 +229,7 @@
- #else
- int posixly_correct = 0; /* Non-zero means posix.2 superset. */
- #endif
-+int import_functions = IMPORT_FUNCTIONS_DEF; /* Import functions from environment */
-
- /* Some long-winded argument names. These are obviously new. */
- #define Int 1
-@@ -248,6 +249,7 @@
- { "help", Int, &want_initial_help, (char **)0x0 },
- { "init-file", Charp, (int *)0x0, &bashrc_file },
- { "login", Int, &make_login_shell, (char **)0x0 },
-+ { "import-functions", Int, &import_functions, (char **)0x0 },
- { "noediting", Int, &no_line_editing, (char **)0x0 },
- { "noprofile", Int, &no_profile, (char **)0x0 },
- { "norc", Int, &no_rc, (char **)0x0 },
-
---- variables.c.orig 2014-09-28 11:15:53.189768951 -0500
-+++ variables.c 2014-09-28 11:27:07.250722694 -0500
-@@ -110,6 +110,7 @@ extern time_t shell_start_time;
- extern int assigning_in_environment;
- extern int executing_builtin;
- extern int funcnest_max;
-+extern int import_functions;
-
- #if defined (READLINE)
- extern int no_line_editing;
-@@ -328,6 +329,7 @@ initialize_shell_variables (env, privmod
- char *name, *string, *temp_string;
- int c, char_index, string_index, string_length, ro;
- SHELL_VAR *temp_var;
-+ int skipped_import;
-
- create_variable_tables ();
-
-@@ -352,9 +354,12 @@ initialize_shell_variables (env, privmod
-
- temp_var = (SHELL_VAR *)NULL;
-
-+ skipped_import = 0;
-+reval:
-+
- /* If exported function, define it now. Don't import functions from
- the environment in privileged mode. */
-- if (privmode == 0 && read_but_dont_execute == 0 &&
-+ if (skipped_import == 0 && privmode == 0 && read_but_dont_execute == 0 &&
- STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
- STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
- STREQN ("() {", string, 4))
-@@ -367,6 +372,12 @@ initialize_shell_variables (env, privmod
- tname = name + BASHFUNC_PREFLEN; /* start of func name */
- tname[namelen] = '\0'; /* now tname == func name */
-
-+ if (!import_functions && !interactive_shell) {
-+ skipped_import = 1;
-+ report_error (_("Skipping importing function definition for `%s': --import-functions required."), tname);
-+ goto reval;
-+ }
-+
- string_length = strlen (string);
- temp_string = (char *)xmalloc (namelen + string_length + 2);
-
diff --git a/shells/bash/files/patch-config-top.h b/shells/bash/files/patch-config-top.h
index 7ad15c78c59a..08f330f61fb5 100644
--- a/shells/bash/files/patch-config-top.h
+++ b/shells/bash/files/patch-config-top.h
@@ -1,6 +1,6 @@
---- config-top.h.orig 2014-03-02 13:36:24.000000000 -0500
-+++ config-top.h 2014-03-02 13:38:13.000000000 -0500
-@@ -59,18 +59,18 @@
+--- config-top.h.orig 2016-05-19 18:34:02 UTC
++++ config-top.h
+@@ -63,18 +63,18 @@
/* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE
#define DEFAULT_PATH_VALUE \
diff --git a/shells/bash/files/patch-doc_Makefile.in b/shells/bash/files/patch-doc_Makefile.in
index ef9ff11b4b4d..cb4f37662857 100644
--- a/shells/bash/files/patch-doc_Makefile.in
+++ b/shells/bash/files/patch-doc_Makefile.in
@@ -1,6 +1,6 @@
---- doc/Makefile.in.orig 2014-03-02 13:39:04.000000000 -0500
-+++ doc/Makefile.in 2014-03-02 13:39:56.000000000 -0500
-@@ -167,7 +167,7 @@
+--- doc/Makefile.in.orig 2015-12-07 00:55:56 UTC
++++ doc/Makefile.in
+@@ -175,7 +175,7 @@ pdf: ${PDFFILES}
bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; }
@@ -8,14 +8,14 @@
+bash.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
$(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
- # can also use:
-@@ -175,9 +175,6 @@
+ # experimental
+@@ -188,9 +188,6 @@ bashref.pdf: $(BASHREF_FILES) $(HSUSER)
bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
- $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
+ $(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
-bash.info: bashref.info
- ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
-
bash.txt: bash.1
bash.ps: bash.1
- bash.html: bash.1 $(MAN2HTML)
+ bash.html: bash.1
diff --git a/shells/bash/files/patch-doc_bash.1 b/shells/bash/files/patch-doc_bash.1
index 7aad7f51aa2f..9fb720f4d0c6 100644
--- a/shells/bash/files/patch-doc_bash.1
+++ b/shells/bash/files/patch-doc_bash.1
@@ -1,6 +1,6 @@
---- doc/bash.1.orig Wed Dec 28 19:44:28 2005
-+++ doc/bash.1 Wed Dec 28 20:03:12 2005
-@@ -1897,7 +1897,7 @@
+--- doc/bash.1.orig 2016-09-29 22:30:30 UTC
++++ doc/bash.1
+@@ -2364,7 +2364,7 @@ The value of this parameter is expanded
.SM
.B PROMPTING
below) and used as the primary prompt string. The default value is
@@ -9,7 +9,7 @@
.TP
.B PS2
The value of this parameter is expanded as with
-@@ -8784,7 +8784,7 @@
+@@ -10556,7 +10556,7 @@ http://tiswww.case.edu/~chet/bash/POSIX
.SH FILES
.PD 0
.TP
diff --git a/shells/bash/files/patch-doc_bashref.texi b/shells/bash/files/patch-doc_bashref.texi
index 65b229afd148..08d80e40a8c9 100644
--- a/shells/bash/files/patch-doc_bashref.texi
+++ b/shells/bash/files/patch-doc_bashref.texi
@@ -1,5 +1,5 @@
---- doc/bashref.texi.orig 2014-03-02 13:40:51.000000000 -0500
-+++ doc/bashref.texi 2014-03-02 13:42:04.000000000 -0500
+--- doc/bashref.texi.orig 2016-09-29 22:30:30 UTC
++++ doc/bashref.texi
@@ -1,6 +1,6 @@
\input texinfo.tex @c -*- texinfo -*-
@c %**start of header
@@ -17,8 +17,8 @@
This is Edition @value{EDITION}, last updated @value{UPDATED},
of @cite{The GNU Bash Reference Manual},
-@@ -5299,7 +5299,7 @@
-
+@@ -5443,7 +5443,7 @@ A null directory name may appear as two
+ or trailing colon.
@item PS1
-The primary prompt string. The default value is @samp{\s-\v\$ }.
diff --git a/shells/bash/files/patch-lib_readline_display.c b/shells/bash/files/patch-lib_readline_display.c
index f05f78b72c7d..f057294bc669 100644
--- a/shells/bash/files/patch-lib_readline_display.c
+++ b/shells/bash/files/patch-lib_readline_display.c
@@ -1,11 +1,13 @@
---- lib/readline/display.c.orig 2009-01-04 11:32:32.000000000 -0800
-+++ lib/readline/display.c 2009-03-08 00:51:31.000000000 -0800
-@@ -654,5 +654,8 @@ rl_redisplay ()
- /* inv_lbreaks[i] is where line i starts in the buffer. */
+--- lib/readline/display.c.orig 2016-07-28 18:49:33 UTC
++++ lib/readline/display.c
+@@ -743,7 +743,10 @@ rl_redisplay ()
inv_lbreaks[newlines = 0] = 0;
+ /* lpos is a physical cursor position, so it needs to be adjusted by the
+ number of invisible characters in the prompt, per line */
+ if (local_prompt)
lpos = prompt_physical_chars + modmark;
+ else
+ lpos = 0;
#if defined (HANDLE_MULTIBYTE)
+ memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wbsize * sizeof (int));