View | Details | Raw Unified | Return to bug 234827
Collapse All | Expand All

(-)Makefile (-14 / +13 lines)
Lines 2-20 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=		bash
4
PORTNAME=		bash
5
PATCHLEVEL=		23
5
#PATCHLEVEL=		0
6
PORTVERSION=		4.4.${PATCHLEVEL:S/^0//g}
6
#PORTVERSION=		5.0.${PATCHLEVEL:S/^0//g}
7
PORTREVISION?=		1
7
PORTVERSION=		5.0
8
PORTREVISION?=		0
8
CATEGORIES=		shells
9
CATEGORIES=		shells
9
MASTER_SITES=		GNU
10
MASTER_SITES=		GNU
10
DISTNAME=		${PORTNAME}-${PORTVERSION:R}
11
#DISTNAME=		${PORTNAME}-${PORTVERSION:R}
11
DIST_SUBDIR=		${PORTNAME}
12
DIST_SUBDIR=		${PORTNAME}
12
EXTRACT_ONLY=		${DISTNAME}${EXTRACT_SUFX}
13
EXTRACT_ONLY=		${DISTNAME}${EXTRACT_SUFX}
13
14
14
PATCH_SITES=		GNU/${PORTNAME}/${DISTNAME}-patches/
15
#PATCH_SITES=		GNU/${PORTNAME}/${DISTNAME}-patches/
15
PATCHFILES!=		/usr/bin/jot -s " " -w \
16
#PATCHFILES!=		/usr/bin/jot -s " " -w \
16
			${PORTNAME}${PORTVERSION:R:S/.//g}-%03d \
17
#			${PORTNAME}${PORTVERSION:R:S/.//g}-%03d \
17
			${PATCHLEVEL} 1 ${PATCHLEVEL}
18
#			${PATCHLEVEL} 1 ${PATCHLEVEL}
18
19
19
MAINTAINER=		ehaupt@FreeBSD.org
20
MAINTAINER=		ehaupt@FreeBSD.org
20
COMMENT=		GNU Project's Bourne Again SHell
21
COMMENT=		GNU Project's Bourne Again SHell
Lines 22-42 Link Here
22
LICENSE=		GPLv3+
23
LICENSE=		GPLv3+
23
LICENSE_FILE=		${WRKSRC}/COPYING
24
LICENSE_FILE=		${WRKSRC}/COPYING
24
25
25
OPTIONS_DEFINE=		COLONBREAKSWORDS FDESCFS HELP NLS STATIC SYSBASHRC SYSLOG DOCS
26
OPTIONS_DEFINE=		FDESCFS HELP NLS STATIC SYSBASHRC SYSLOG DOCS
26
COLONBREAKSWORDS_DESC=	Colons break words
27
FDESCFS_DESC=		Enable use of /dev/fd
27
FDESCFS_DESC=		Enable use of /dev/fd
28
HELP_DESC=		Enable builtin help
28
HELP_DESC=		Enable builtin help
29
SYSBASHRC_DESC=		Enable system-wide rc files
29
SYSBASHRC_DESC=		Enable system-wide rc files
30
30
31
OPTIONS_DEFAULT=	COLONBREAKSWORDS HELP
31
OPTIONS_DEFAULT=	HELP
32
32
33
USES=			bison cpe iconv makeinfo pathfix
33
USES=			bison cpe iconv makeinfo pathfix localbase
34
GNU_CONFIGURE=		yes
34
GNU_CONFIGURE=		yes
35
OPTIONS_SUB=		yes
35
OPTIONS_SUB=		yes
36
CPE_VENDOR=		gnu
36
CPE_VENDOR=		gnu
37
37
38
COLONBREAKSWORDS_EXTRA_PATCHES=	${PATCHDIR}/extrapatch-colonbreakswords
39
40
FDESCFS_CONFIGURE_ENV_OFF=	bash_cv_dev_fd=absent
38
FDESCFS_CONFIGURE_ENV_OFF=	bash_cv_dev_fd=absent
41
FDESCFS_SUB_FILES=	pkg-message
39
FDESCFS_SUB_FILES=	pkg-message
42
40
Lines 83-88 Link Here
83
.if ${PORT_OPTIONS:MSYSLOG}
81
.if ${PORT_OPTIONS:MSYSLOG}
84
	@${REINPLACE_CMD} \
82
	@${REINPLACE_CMD} \
85
	    -e "s|/\*.*#define SYSLOG_HISTORY .*\*/|#define SYSLOG_HISTORY|g" \
83
	    -e "s|/\*.*#define SYSLOG_HISTORY .*\*/|#define SYSLOG_HISTORY|g" \
84
	    -e "s|/\*.*#define SYSLOG_SHOPT .*\*/|#define SYSLOG_SHOPT 1|g" \
86
	    ${WRKSRC}/config-top.h
85
	    ${WRKSRC}/config-top.h
87
.endif
86
.endif
88
87
(-)distinfo (-49 / +3 lines)
Lines 1-49 Link Here
1
TIMESTAMP = 1527921957
1
TIMESTAMP = 1547129229
2
SHA256 (bash/bash-4.4.tar.gz) = d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb
2
SHA256 (bash/bash-5.0.tar.gz) = b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d
3
SIZE (bash/bash-4.4.tar.gz) = 9377313
3
SIZE (bash/bash-5.0.tar.gz) = 10135110
4
SHA256 (bash/bash44-001) = 3e28d91531752df9a8cb167ad07cc542abaf944de9353fe8c6a535c9f1f17f0f
5
SIZE (bash/bash44-001) = 1896
6
SHA256 (bash/bash44-002) = 7020a0183e17a7233e665b979c78c184ea369cfaf3e8b4b11f5547ecb7c13c53
7
SIZE (bash/bash44-002) = 1946
8
SHA256 (bash/bash44-003) = 51df5a9192fdefe0ddca4bdf290932f74be03ffd0503a3d112e4199905e718b2
9
SIZE (bash/bash44-003) = 1593
10
SHA256 (bash/bash44-004) = ad080a30a4ac6c1273373617f29628cc320a35c8cd06913894794293dc52c8b3
11
SIZE (bash/bash44-004) = 2350
12
SHA256 (bash/bash44-005) = 221e4b725b770ad0bb6924df3f8d04f89eeca4558f6e4c777dfa93e967090529
13
SIZE (bash/bash44-005) = 1439
14
SHA256 (bash/bash44-006) = 6a8e2e2a6180d0f1ce39dcd651622fb6d2fd05db7c459f64ae42d667f1e344b8
15
SIZE (bash/bash44-006) = 1805
16
SHA256 (bash/bash44-007) = de1ccc07b7bfc9e25243ad854f3bbb5d3ebf9155b0477df16aaf00a7b0d5edaf
17
SIZE (bash/bash44-007) = 4640
18
SHA256 (bash/bash44-008) = 86144700465933636d7b945e89b77df95d3620034725be161ca0ca5a42e239ba
19
SIZE (bash/bash44-008) = 2223
20
SHA256 (bash/bash44-009) = 0b6bdd1a18a0d20e330cc3bc71e048864e4a13652e29dc0ebf3918bea729343c
21
SIZE (bash/bash44-009) = 3117
22
SHA256 (bash/bash44-010) = 8465c6f2c56afe559402265b39d9e94368954930f9aa7f3dfa6d36dd66868e06
23
SIZE (bash/bash44-010) = 1670
24
SHA256 (bash/bash44-011) = dd56426ef7d7295e1107c0b3d06c192eb9298f4023c202ca2ba6266c613d170d
25
SIZE (bash/bash44-011) = 1603
26
SHA256 (bash/bash44-012) = fac271d2bf6372c9903e3b353cb9eda044d7fe36b5aab52f21f3f21cd6a2063e
27
SIZE (bash/bash44-012) = 5768
28
SHA256 (bash/bash44-013) = 1b25efacbc1c4683b886d065b7a089a3601964555bcbf11f3a58989d38e853b6
29
SIZE (bash/bash44-013) = 1255
30
SHA256 (bash/bash44-014) = a7f75cedb43c5845ab1c60afade22dcb5e5dc12dd98c0f5a3abcfb9f309bb17c
31
SIZE (bash/bash44-014) = 2834
32
SHA256 (bash/bash44-015) = d37602ecbeb62d5a22c8167ea1e621fcdbaaa79925890a973a45c810dd01c326
33
SIZE (bash/bash44-015) = 1233
34
SHA256 (bash/bash44-016) = 501f91cc89fadced16c73aa8858796651473602c722bb29f86a8ba588d0ff1b1
35
SIZE (bash/bash44-016) = 2069
36
SHA256 (bash/bash44-017) = 773f90b98768d4662a22470ea8eec5fdd8e3439f370f94638872aaf884bcd270
37
SIZE (bash/bash44-017) = 1143
38
SHA256 (bash/bash44-018) = 5bc494b42f719a8b0d844b7bd9ad50ebaae560e97f67c833c9e7e9d53981a8cc
39
SIZE (bash/bash44-018) = 1319
40
SHA256 (bash/bash44-019) = 27170d6edfe8819835407fdc08b401d2e161b1400fe9d0c5317a51104c89c11e
41
SIZE (bash/bash44-019) = 1671
42
SHA256 (bash/bash44-020) = 1840e2cbf26ba822913662f74037594ed562361485390c52813b38156c99522c
43
SIZE (bash/bash44-020) = 5156
44
SHA256 (bash/bash44-021) = bd8f59054a763ec1c64179ad5cb607f558708a317c2bdb22b814e3da456374c1
45
SIZE (bash/bash44-021) = 1810
46
SHA256 (bash/bash44-022) = 45331f0936e36ab91bfe44b936e33ed8a1b1848fa896e8a1d0f2ef74f297cb79
47
SIZE (bash/bash44-022) = 1818
48
SHA256 (bash/bash44-023) = 4fec236f3fbd3d0c47b893fdfa9122142a474f6ef66c20ffb6c0f4864dd591b6
49
SIZE (bash/bash44-023) = 1557
(-)files/extrapatch-colonbreakswords (-176 lines)
Lines 1-176 Link Here
1
--- bashline.c.orig	2014-03-02 13:26:23.000000000 -0500
2
+++ bashline.c	2014-03-02 13:30:09.000000000 -0500
3
@@ -255,6 +255,11 @@
4
    host list. */
5
 int perform_hostname_completion = 1;
6
 
7
+/* If non-zero, we do hostname completion, breaking words at `@' and
8
+   trying to complete the stuff after the `@' from our own internal
9
+   host list. */
10
+int colon_is_wordbreak = 1;
11
+
12
 /* If non-zero, we don't do command completion on an empty line. */
13
 int no_empty_command_completion;
14
 
15
@@ -284,7 +289,8 @@
16
 
17
 static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:";
18
 static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:";
19
-/* )) */
20
+static char *bash_nocolon_word_break_characters = " \t\n\"'@><=;|&(";
21
+/* ))) */
22
 
23
 static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~";	/*}*/
24
 static char *custom_filename_quote_characters = 0;
25
@@ -403,6 +409,80 @@
26
   return (old_value);
27
 }
28
 
29
+/* When this function returns, rl_completer_word_break_characters points to
30
+   dynamically allocated memory. */
31
+int
32
+enable_colon_wordbreak (on_or_off)
33
+     int on_or_off;
34
+{
35
+  int old_value;
36
+  char *at, *nv, *nval;
37
+
38
+  old_value = colon_is_wordbreak;
39
+
40
+  if (on_or_off)
41
+    {
42
+      colon_is_wordbreak = 1;
43
+      rl_filename_quote_characters = default_filename_quote_characters;
44
+    }
45
+  else
46
+    {
47
+      colon_is_wordbreak = 0;
48
+      rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!{~";   /*}*/
49
+    }
50
+
51
+  /* Now we need to figure out how to appropriately modify and assign
52
+     rl_completer_word_break_characters depending on whether we want
53
+     the colon to be a word break or not. */
54
+
55
+  /* If this is the first time this has been called
56
+     (bash_readline_initialized == 0), use the sames values as before, but
57
+     allocate new memory for rl_completer_word_break_characters. */
58
+
59
+  if (bash_readline_initialized == 0 &&
60
+      (rl_completer_word_break_characters == 0 ||
61
+       rl_completer_word_break_characters == rl_basic_word_break_characters))
62
+    {
63
+      if (on_or_off)
64
+       rl_completer_word_break_characters = savestring (bash_completer_word_break_characters);
65
+      else
66
+       rl_completer_word_break_characters = savestring (bash_nocolon_word_break_characters);
67
+    }
68
+  else
69
+    {
70
+      /* See if we have anything to do. */
71
+      at = strchr (rl_completer_word_break_characters, ':');
72
+      if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
73
+        return old_value;
74
+
75
+      /* We have something to do.  Do it. */
76
+      nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off);
77
+
78
+      if (on_or_off == 0)
79
+       {
80
+         /* Turn it off -- just remove `:' from word break chars.  We want
81
+            to remove all occurrences of `:' from the char list, so we loop
82
+            rather than just copy the rest of the list over AT. */
83
+         for (nv = nval, at = rl_completer_word_break_characters; *at; )
84
+           if (*at != ':')
85
+             *nv++ = *at++;
86
+           else
87
+             at++;
88
+         *nv = '\0';
89
+       }
90
+      else
91
+       {
92
+         nval[0] = ':';
93
+         strcpy (nval + 1, rl_completer_word_break_characters);
94
+        }
95
+
96
+      free (rl_completer_word_break_characters);
97
+      rl_completer_word_break_characters = nval;
98
+    }
99
+
100
+  return (old_value);
101
+}
102
+
103
 /* Called once from parse.y if we are going to use readline. */
104
 void
105
 initialize_readline ()
106
@@ -573,8 +653,13 @@
107
      completion is enabled. */
108
   enable_hostname_completion (perform_hostname_completion);
109
 
110
+  /* This sets rl_completer_word_break_characters and rl_filename_quote_characters
111
+     to the appropriate values, depending on whether or not a colon
112
+     should break completion words or not. */
113
+  enable_colon_wordbreak (colon_is_wordbreak);
114
+
115
   /* characters that need to be quoted when appearing in filenames. */
116
-  rl_filename_quote_characters = default_filename_quote_characters;
117
+//  rl_filename_quote_characters = default_filename_quote_characters;
118
   set_filename_bstab (rl_filename_quote_characters);
119
 
120
   rl_filename_quoting_function = bash_quote_filename;
121
--- builtins/shopt.def.orig	2014-03-02 13:30:44.000000000 -0500
122
+++ builtins/shopt.def	2014-03-02 13:31:38.000000000 -0500
123
@@ -103,6 +103,8 @@
124
 extern int complete_fullquote;
125
 
126
 extern int enable_hostname_completion __P((int));
127
+extern int colon_is_wordbreak;
128
+extern int enable_colon_wordbreak __P((int));
129
 #endif
130
 
131
 #if defined (PROGRAMMABLE_COMPLETION)
132
@@ -166,6 +168,9 @@
133
   { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
134
   { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL },
135
 #endif
136
+#if defined (READLINE)
137
+  { "colonbreakswords", &colon_is_wordbreak, enable_colon_wordbreak },
138
+#endif
139
   { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
140
   { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
141
   { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL },
142
--- doc/bash.1.orig	2014-03-02 13:32:14.000000000 -0500
143
+++ doc/bash.1	2014-03-02 13:32:40.000000000 -0500
144
@@ -9252,6 +9252,18 @@
145
 command in the same history entry.  This allows
146
 easy re-editing of multi-line commands.
147
 .TP 8
148
+.B colonbreakswords
149
+If set, and
150
+.B readline
151
+is being used, \fBbash\fP will treat \fB:\fP as
152
+separating word being completed (see
153
+.B Completing
154
+under
155
+.SM
156
+.B READLINE
157
+above).
158
+This is enabled by default.
159
+.TP 8
160
 .B compat31
161
 If set,
162
 .B bash
163
--- doc/bashref.texi.orig	2014-03-02 13:33:17.000000000 -0500
164
+++ doc/bashref.texi	2014-03-02 13:33:44.000000000 -0500
165
@@ -4937,6 +4937,11 @@
166
 command in the same history entry.  This allows
167
 easy re-editing of multi-line commands.
168
 
169
+@item colonbreakswords
170
+If set, and Readline is being used, Bash will treat @samp{:} as
171
+separating word being completed (@pxref{Commands For Completion}).
172
+This option is enabled by default.
173
+
174
 @item compat31
175
 If set, Bash
176
 changes its behavior to that of version 3.1 with respect to quoted
(-)files/patch-lib_readline_display.c (-5 / +5 lines)
Lines 1-9 Link Here
1
--- lib/readline/display.c.orig	2016-07-28 18:49:33 UTC
1
--- lib/readline/display.c.orig	2018-10-01 01:37:48 UTC
2
+++ lib/readline/display.c
2
+++ lib/readline/display.c
3
@@ -743,7 +743,10 @@ rl_redisplay ()
3
@@ -837,7 +837,10 @@ rl_redisplay (void)
4
   inv_lbreaks[newlines = 0] = 0;
4
      the line breaks in the prompt string in expand_prompt, taking invisible
5
   /* lpos is a physical cursor position, so it needs to be adjusted by the
5
      characters into account, and if lpos exceeds the screen width, we copy
6
      number of invisible characters in the prompt, per line */
6
      the data in the loop below. */
7
+  if (local_prompt)
7
+  if (local_prompt)
8
   lpos = prompt_physical_chars + modmark;
8
   lpos = prompt_physical_chars + modmark;
9
+  else
9
+  else
(-)pkg-plist (+4 lines)
Lines 62-71 Link Here
62
%%NO_STATIC%%lib/bash/Makefile.inc
62
%%NO_STATIC%%lib/bash/Makefile.inc
63
%%NO_STATIC%%lib/bash/basename
63
%%NO_STATIC%%lib/bash/basename
64
%%NO_STATIC%%lib/bash/dirname
64
%%NO_STATIC%%lib/bash/dirname
65
%%NO_STATIC%%lib/bash/fdflags
65
%%NO_STATIC%%lib/bash/finfo
66
%%NO_STATIC%%lib/bash/finfo
66
%%NO_STATIC%%lib/bash/head
67
%%NO_STATIC%%lib/bash/head
67
%%NO_STATIC%%lib/bash/id
68
%%NO_STATIC%%lib/bash/id
68
%%NO_STATIC%%lib/bash/ln
69
%%NO_STATIC%%lib/bash/ln
70
%%NO_STATIC%%lib/bash/loadables.h
69
%%NO_STATIC%%lib/bash/logname
71
%%NO_STATIC%%lib/bash/logname
70
%%NO_STATIC%%lib/bash/mkdir
72
%%NO_STATIC%%lib/bash/mkdir
71
%%NO_STATIC%%lib/bash/mypid
73
%%NO_STATIC%%lib/bash/mypid
Lines 75-80 Link Here
75
%%NO_STATIC%%lib/bash/push
77
%%NO_STATIC%%lib/bash/push
76
%%NO_STATIC%%lib/bash/realpath
78
%%NO_STATIC%%lib/bash/realpath
77
%%NO_STATIC%%lib/bash/rmdir
79
%%NO_STATIC%%lib/bash/rmdir
80
%%NO_STATIC%%lib/bash/seq
78
%%NO_STATIC%%lib/bash/setpgid
81
%%NO_STATIC%%lib/bash/setpgid
79
%%NO_STATIC%%lib/bash/sleep
82
%%NO_STATIC%%lib/bash/sleep
80
%%NO_STATIC%%lib/bash/strftime
83
%%NO_STATIC%%lib/bash/strftime
Lines 113-118 Link Here
113
%%NLS%%share/locale/nb/LC_MESSAGES/bash.mo
116
%%NLS%%share/locale/nb/LC_MESSAGES/bash.mo
114
%%NLS%%share/locale/nl/LC_MESSAGES/bash.mo
117
%%NLS%%share/locale/nl/LC_MESSAGES/bash.mo
115
%%NLS%%share/locale/pl/LC_MESSAGES/bash.mo
118
%%NLS%%share/locale/pl/LC_MESSAGES/bash.mo
119
%%NLS%%share/locale/pt/LC_MESSAGES/bash.mo
116
%%NLS%%share/locale/pt_BR/LC_MESSAGES/bash.mo
120
%%NLS%%share/locale/pt_BR/LC_MESSAGES/bash.mo
117
%%NLS%%share/locale/ro/LC_MESSAGES/bash.mo
121
%%NLS%%share/locale/ro/LC_MESSAGES/bash.mo
118
%%NLS%%share/locale/ru/LC_MESSAGES/bash.mo
122
%%NLS%%share/locale/ru/LC_MESSAGES/bash.mo

Return to bug 234827