summaryrefslogtreecommitdiff
path: root/shells/bash/files
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2004-09-03 09:21:31 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2004-09-03 09:21:31 +0000
commita55fe984d507d48edec7bf81b69c6ec943d185b7 (patch)
tree6237bd1115eb50ffdf803493906bb7f654220532 /shells/bash/files
parentFix build in presence of x11/nvidia-driver (diff)
- add FAQ
- experimental shopt `implicitcd' - fix `Tags out of Date' in texinfo pages - fix line wrap bug in libreadline - set LATEST_LINK to `bash', so that `pkg_add -r bash' works
Diffstat (limited to 'shells/bash/files')
-rw-r--r--shells/bash/files/patch-doc::Makefile.in18
-rw-r--r--shells/bash/files/patch-doc::bashref.texi19
-rw-r--r--shells/bash/files/patch-lib::readline::display.c23
-rw-r--r--shells/bash/files/xpatch-implicitcd99
4 files changed, 159 insertions, 0 deletions
diff --git a/shells/bash/files/patch-doc::Makefile.in b/shells/bash/files/patch-doc::Makefile.in
new file mode 100644
index 000000000000..b14453a5e531
--- /dev/null
+++ b/shells/bash/files/patch-doc::Makefile.in
@@ -0,0 +1,18 @@
+--- doc/Makefile.in.orig Tue Aug 31 00:34:30 2004
++++ doc/Makefile.in Tue Aug 31 00:36:03 2004
+@@ -161,14 +161,11 @@
+ bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi
+
+-bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
++bash.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
+
+ bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
+-
+-bash.info: bashref.info
+- ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
+
+ bash.txt: bash.1
+ bash.ps: bash.1
diff --git a/shells/bash/files/patch-doc::bashref.texi b/shells/bash/files/patch-doc::bashref.texi
new file mode 100644
index 000000000000..e56d56bb9792
--- /dev/null
+++ b/shells/bash/files/patch-doc::bashref.texi
@@ -0,0 +1,19 @@
+--- doc/bashref.texi.orig Wed Sep 1 22:37:32 2004
++++ doc/bashref.texi Wed Sep 1 22:30:57 2004
+@@ -1,6 +1,6 @@
+ \input texinfo.tex @c -*- texinfo -*-
+ @c %**start of header
+-@setfilename bashref.info
++@setfilename bash.info
+ @settitle Bash Reference Manual
+ @c %**end of header
+
+@@ -10,7 +10,7 @@
+
+ @copying
+ This text is a brief description of the features that are present in
+-the Bash shell (version @value{VERSION}, @value{UPDATED}).
++the Bash shell (version @value{VERSION}, @value{UPDATED})
+
+ This is Edition @value{EDITION}, last updated @value{UPDATED},
+ of @cite{The GNU Bash Reference Manual},
diff --git a/shells/bash/files/patch-lib::readline::display.c b/shells/bash/files/patch-lib::readline::display.c
new file mode 100644
index 000000000000..578c5c166fd8
--- /dev/null
+++ b/shells/bash/files/patch-lib::readline::display.c
@@ -0,0 +1,23 @@
+#
+# Fix line wraps
+# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00325.html
+#
+--- lib/readline/display.c.orig Wed Sep 1 18:28:21 2004
++++ lib/readline/display.c Wed Sep 1 18:29:18 2004
+@@ -351,14 +351,14 @@
+ local_prompt = expand_prompt (p, &prompt_visible_length,
+ &prompt_last_invisible,
+ (int *)NULL,
+- (int *)NULL);
++ &prompt_physical_chars);
+ c = *t; *t = '\0';
+ /* The portion of the prompt string up to and including the
+ final newline is now null-terminated. */
+ local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
+ (int *)NULL,
+ &prompt_invis_chars_first_line,
+- &prompt_physical_chars);
++ (int *)NULL);
+ *t = c;
+ return (prompt_prefix_length);
+ }
diff --git a/shells/bash/files/xpatch-implicitcd b/shells/bash/files/xpatch-implicitcd
new file mode 100644
index 000000000000..bbd077cf6217
--- /dev/null
+++ b/shells/bash/files/xpatch-implicitcd
@@ -0,0 +1,99 @@
+#
+# new shopt `implicitcd'
+# http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00024.html
+#
+--- execute_cmd.c.orig Sun Jul 4 20:12:58 2004
++++ execute_cmd.c Wed Sep 1 22:28:29 2004
+@@ -190,6 +190,9 @@
+ /* The line number that the currently executing function starts on. */
+ static int function_line_number;
+
++/* 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;
+@@ -2909,6 +2912,20 @@
+ this_command_name = words->word->word;
+
+ 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
+--- builtins/shopt.def.orig Wed Sep 1 22:32:59 2004
++++ builtins/shopt.def Wed Sep 1 22:31:27 2004
+@@ -66,6 +66,7 @@
+ extern int check_window_size;
+ extern int glob_ignore_case;
+ extern int hup_on_exit;
++extern int implicitcd;
+ extern int xpg_echo;
+ extern int gnu_error_format;
+
+@@ -145,6 +146,7 @@
+ { "hostcomplete", &perform_hostname_completion, 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 },
+ #if defined (HISTORY)
+ { "lithist", &literal_history, (shopt_set_func_t *)NULL },
+@@ -252,6 +254,7 @@
+ cdable_vars = mail_warning = 0;
+ no_exit_on_failed_exec = print_shift_error = 0;
+ check_hashed_filenames = cdspelling = expand_aliases = check_window_size = 0;
++ implicitcd = 0;
+
+ source_uses_path = promptvars = 1;
+
+--- doc/bash.1.orig Mon Jul 12 17:27:08 2004
++++ doc/bash.1 Wed Sep 1 22:21:44 2004
+@@ -7970,6 +7970,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 Wed Sep 1 22:37:32 2004
++++ doc/bashref.texi Wed Sep 1 22:30:57 2004
+@@ -3661,6 +3661,15 @@
+ @item huponexit
+ 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{#}