mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-30 23:13:49 +02:00
commit bash-20070530 snapshot
This commit is contained in:
@@ -1774,7 +1774,12 @@ this:
|
||||
echo .!(.|) *
|
||||
|
||||
A solution that works without extended globbing is given in the Unix Shell
|
||||
FAQ, posted periodically to comp.unix.shell.
|
||||
FAQ, posted periodically to comp.unix.shell. It's a variant of
|
||||
|
||||
echo .[!.]* ..?* *
|
||||
|
||||
(The ..?* catches files with names of three or more characters beginning
|
||||
with `..')
|
||||
|
||||
Section H: Where do I go from here?
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This is the Bash FAQ, version 3.35, for Bash version 3.2.
|
||||
This is the Bash FAQ, version 3.36, for Bash version 3.2.
|
||||
|
||||
This document contains a set of frequently-asked questions concerning
|
||||
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
|
||||
@@ -79,6 +79,8 @@ E11) If I resize my xterm while another program is running, why doesn't bash
|
||||
notice the change?
|
||||
E12) Why don't negative offsets in substring expansion work like I expect?
|
||||
E13) Why does filename completion misbehave if a colon appears in the filename?
|
||||
E14) Why does quoting the pattern argument to the regular expression matching
|
||||
conditional operator (=~) cause matching to stop working?
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
@@ -1427,6 +1429,34 @@ COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
|
||||
You can also quote the colon with a backslash to achieve the same result
|
||||
temporarily.
|
||||
|
||||
E14) Why does quoting the pattern argument to the regular expression matching
|
||||
conditional operator (=~) cause regexp matching to stop working?
|
||||
|
||||
In versions of bash prior to bash-3.2, the effect of quoting the regular
|
||||
expression argument to the [[ command's =~ operator was not specified.
|
||||
The practical effect was that double-quoting the pattern argument required
|
||||
backslashes to quote special pattern characters, which interfered with the
|
||||
backslash processing performed by double-quoted word expansion and was
|
||||
inconsistent with how the == shell pattern matching operator treated
|
||||
quoted characters.
|
||||
|
||||
In bash-3.2, the shell was changed to internally quote characters in single-
|
||||
and double-quoted string arguments to the =~ operator, which suppresses the
|
||||
special meaning of the characters special to regular expression processing
|
||||
(`.', `[', `\', `(', `), `*', `+', `?', `{', `|', `^', and `$') and forces
|
||||
them to be matched literally. This is consistent with how the `==' pattern
|
||||
matching operator treats quoted portions of its pattern argument.
|
||||
|
||||
Since the treatment of quoted string arguments was changed, several issues
|
||||
have arisen, chief among them the problem of white space in pattern arguments
|
||||
and the differing treatment of quoted strings between bash-3.1 and bash-3.2.
|
||||
Both problems may be solved by using a shell variable to hold the pattern.
|
||||
Since word splitting is not performed when expanding shell variables in all
|
||||
operands of the [[ command, this allows users to quote patterns as they wish
|
||||
when assigning the variable, then expand the values to a single string that
|
||||
may contain whitespace. The first problem may be solved by using backslashes
|
||||
or any other quoting mechanism to escape the white space in the patterns.
|
||||
|
||||
Section F: Things to watch out for on certain Unix versions
|
||||
|
||||
F1) Why can't I use command line editing in my `cmdtool'?
|
||||
|
||||
+1
-1
@@ -577,7 +577,7 @@ and
|
||||
have equal precedence, followed by
|
||||
.B ;
|
||||
and
|
||||
.BR &,
|
||||
.BR & ,
|
||||
which have equal precedence.
|
||||
.PP
|
||||
A sequence of one or more newlines may appear in a \fIlist\fP instead
|
||||
|
||||
Reference in New Issue
Block a user