]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20111118 snapshot
authorChet Ramey <chet.ramey@case.edu>
Mon, 9 Jan 2012 13:33:08 +0000 (08:33 -0500)
committerChet Ramey <chet.ramey@case.edu>
Mon, 9 Jan 2012 13:33:08 +0000 (08:33 -0500)
21 files changed:
CWRU/CWRU.chlog
CWRU/CWRU.chlog~
MANIFEST
MANIFEST~ [new file with mode: 0644]
doc/bash.1
doc/bash.1~
doc/bashref.texi
doc/bashref.texi~
doc/version.texi
doc/version.texi~
lib/readline/doc/hsuser.texi
lib/readline/doc/hsuser.texi~ [new file with mode: 0644]
tests/RUN-ONE-TEST
tests/array.right
tests/array11.sub
tests/cond-regexp1.sub [new file with mode: 0644]
tests/cond-regexp2.sub [new file with mode: 0644]
tests/cond.right
tests/cond.tests
variables.c
variables.c~

index 9a70e2f83ca3090fd4b401a496efafb8689b81f2..1bb9c47d8798af2ed7e8641bb56f8858f42f4cb1 100644 (file)
@@ -12608,3 +12608,23 @@ redir.c
          limit is such that the shell can't duplicate to a file descriptor
          >= 10.  Fixes a limitation that tripped a coreutils test reported
          by Paul Eggert <eggert@cs.ucla.edu>
+
+                                  11/19
+                                  -----
+doc/{bash.1,bashref.texi},lib/readline/doc/hsuser.texi
+       - make it clear that bash runs HISTFILESIZE=$HISTSIZE after reading
+         the startup files
+       - make it clear that bash runs HISTSIZE=500 after reading the
+         startup files
+       - make it clear that setting HISTSIZE=0 causes commands to not be
+         saved in the history list
+       - make it clear that setting HISTFILESIZE=0 causes the history file
+         to be truncated to zero size
+
+variables.c
+       - sv_histsize: change so setting HISTSIZE to a value less than 0
+         causes the history to be `unstifled'
+       - sv_histsize: change so setting HISTFILESIZE to a value less than 0
+         results in no file truncation
+       - make it clear that numeric values less than 0 for HISTFILESIZE or
+         HISTSIZE inhibit the usual functions
index 6c946a933afb2915ec7332a8298801beda65247b..6444aa46c559525ff645aa49cf848d44be00e0bd 100644 (file)
@@ -12606,5 +12606,19 @@ redir.c
          if the RX_SAVEFD flag is set
        - add_undo_redirect: set the RX_SAVEFD flag if the file descriptor
          limit is such that the shell can't duplicate to a file descriptor
-         >= 10
+         >= 10.  Fixes a limitation that tripped a coreutils test reported
+         by Paul Eggert <eggert@cs.ucla.edu>
 
+                                  11/19
+                                  -----
+doc/{bash.1,bashref.texi},lib/readline/doc/hsuser.texi
+       - make it clear that bash runs HISTFILESIZE=$HISTSIZE after reading
+         the startup files
+       - make it clear that bash runs HISTSIZE=500 after reading the
+         startup files
+       - make it clear that setting HISTSIZE=0 causes commands to not be
+         saved in the history list
+       - make it clear that setting HISTFILESIZE=0 causes the history file
+         to be truncated to zero size
+       - make it clear that numeric values less than 0 for HISTFILESIZE or
+         HISTSIZE are treated the same as 0
index 6129556c9441b10e3505663519a2a50760e017cf..47321c08e276db063dc31441af181973f26cf85a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -820,7 +820,8 @@ tests/comsub-posix2.sub     f
 tests/comsub-posix3.sub        f
 tests/cond.tests       f
 tests/cond.right       f
-tests/cond-regexp.sub  f
+tests/cond-regexp1.sub f
+tests/cond-regexp2.sub f
 tests/coproc.tests     f
 tests/coproc.right     f
 tests/cprint.tests     f
diff --git a/MANIFEST~ b/MANIFEST~
new file mode 100644 (file)
index 0000000..89f27de
--- /dev/null
+++ b/MANIFEST~
@@ -0,0 +1,1190 @@
+#
+# Master distribution manifest for bash
+#
+#
+# Filename     type
+#
+CWRU           d
+CWRU/misc      d
+builtins       d
+cross-build    d
+doc    d
+examples       d
+examples/obashdb       d
+examples/complete      d
+examples/functions d
+examples/scripts d
+examples/scripts.v2    d
+examples/scripts.noah  d
+examples/startup-files d
+examples/startup-files/apple   d
+examples/misc  d
+examples/loadables d
+examples/loadables/perl        d
+include                d
+lib            d
+lib/glob       d
+lib/glob/doc   d
+lib/intl       d
+lib/malloc     d
+lib/readline   d
+lib/readline/doc d
+lib/readline/examples d
+lib/sh         d
+lib/termcap    d
+lib/tilde      d
+po             d
+support                d
+tests          d
+tests/misc     d
+ABOUT-NLS      f
+ChangeLog      s       CWRU/changelog
+CHANGES                f
+COMPAT         f
+COPYING                f
+INSTALL                f
+MANIFEST       f
+NEWS           f
+NOTES          f
+POSIX          f
+README         f
+RBASH          f
+AUTHORS                f
+Y2K            f
+configure.in   f
+configure      f       755
+Makefile.in    f
+config-top.h   f
+config-bot.h   f
+config.h.in    f
+aclocal.m4     f
+array.c                f
+arrayfunc.c    f
+assoc.c                f
+eval.c         f
+print_cmd.c    f
+general.c      f
+list.c         f
+locale.c       f
+stringlib.c    f
+variables.c    f
+make_cmd.c     f
+copy_cmd.c     f
+unwind_prot.c  f
+dispose_cmd.c  f
+bashhist.c     f
+hashcmd.c      f
+hashlib.c      f
+parse.y                f
+pathexp.c      f
+subst.c                f
+shell.c                f
+trap.c         f
+sig.c          f
+siglist.c      f
+version.c      f
+flags.c                f
+jobs.c         f
+input.c                f
+mailcheck.c    f
+test.c         f
+expr.c         f
+alias.c                f
+execute_cmd.c  f
+findcmd.c      f
+redir.c                f
+bashline.c     f
+braces.c       f
+bracecomp.c    f
+nojobs.c       f
+error.c                f
+xmalloc.c      f
+pcomplete.c    f
+pcomplib.c     f
+mksyntax.c     f
+alias.h                f
+builtins.h     f
+bashhist.h     f
+bashline.h     f
+conftypes.h    f
+patchlevel.h   f
+variables.h    f
+array.h                f
+arrayfunc.h    f
+assoc.h                f
+jobs.h         f
+findcmd.h      f
+hashlib.h      f
+quit.h         f
+flags.h                f
+shell.h                f
+syntax.h       f
+pathexp.h      f
+parser.h       f
+pcomplete.h    f
+sig.h          f
+test.h         f
+trap.h         f
+general.h      f
+unwind_prot.h  f
+input.h                f
+error.h                f
+command.h      f
+externs.h      f
+siglist.h      f
+subst.h                f
+dispose_cmd.h  f
+hashcmd.h      f
+bashansi.h     f
+bashjmp.h      f
+bashintl.h     f
+make_cmd.h     f
+execute_cmd.h  f
+redir.h                f
+bashtypes.h    f
+mailcheck.h    f
+xmalloc.h      f
+y.tab.c                f
+y.tab.h                f
+parser-built   f
+pathnames.h.in f
+builtins/Makefile.in   f
+builtins/alias.def     f
+builtins/bind.def      f
+builtins/break.def     f
+builtins/builtin.def   f
+builtins/caller.def    f
+builtins/cd.def                f
+builtins/colon.def     f
+builtins/command.def   f
+builtins/complete.def  f
+builtins/common.c      f
+builtins/declare.def   f
+builtins/echo.def      f
+builtins/enable.def    f
+builtins/eval.def      f
+builtins/evalfile.c    f
+builtins/evalstring.c  f
+builtins/exec.def      f
+builtins/exit.def      f
+builtins/fc.def                f
+builtins/fg_bg.def     f
+builtins/getopt.c      f
+builtins/getopt.h      f
+builtins/getopts.def   f
+builtins/hash.def      f
+builtins/help.def      f
+builtins/let.def       f
+builtins/history.def   f
+builtins/jobs.def      f
+builtins/kill.def      f
+builtins/mapfile.def   f
+builtins/mkbuiltins.c  f
+builtins/printf.def    f
+builtins/pushd.def     f
+builtins/read.def      f
+builtins/reserved.def  f
+builtins/return.def    f
+builtins/set.def       f
+builtins/setattr.def   f
+builtins/shift.def     f
+builtins/shopt.def     f
+builtins/source.def    f
+builtins/suspend.def   f
+builtins/test.def      f
+builtins/times.def     f
+builtins/trap.def      f
+builtins/type.def      f
+builtins/ulimit.def    f
+builtins/umask.def     f
+builtins/wait.def      f
+builtins/psize.c       f
+builtins/psize.sh      f
+builtins/inlib.def     f
+builtins/bashgetopt.c  f
+builtins/common.h      f
+builtins/bashgetopt.h  f
+cross-build/cygwin32.cache     f
+cross-build/x86-beos.cache     f
+cross-build/opennt.cache       f
+include/ansi_stdlib.h  f
+include/chartypes.h    f
+include/filecntl.h     f
+include/gettext.h      f
+include/maxpath.h      f
+include/memalloc.h     f
+include/ocache.h       f
+include/posixdir.h     f
+include/posixjmp.h     f
+include/posixselect.h  f
+include/posixstat.h    f
+include/posixtime.h    f
+include/posixwait.h    f
+include/shmbchar.h     f
+include/shmbutil.h     f
+include/shtty.h                f
+include/stdc.h         f
+include/systimes.h     f
+include/typemax.h      f
+include/unionwait.h    f
+lib/glob/Makefile.in   f
+lib/glob/sm_loop.c     f
+lib/glob/smatch.c      f
+lib/glob/strmatch.c    f
+lib/glob/strmatch.h    f
+lib/glob/glob.c                f
+lib/glob/glob.h                f
+lib/glob/glob_loop.c   f
+lib/glob/gmisc.c       f
+lib/glob/xmbsrtowcs.c  f
+lib/glob/collsyms.h    f
+lib/glob/doc/Makefile  f
+lib/glob/doc/glob.texi f
+lib/glob/ndir.h                f
+lib/intl/ChangeLog     f
+lib/intl/Makefile.in   f
+lib/intl/VERSION       f
+lib/intl/bindtextdom.c f
+lib/intl/config.charset        f
+lib/intl/dcgettext.c   f
+lib/intl/dcigettext.c  f
+lib/intl/dcngettext.c  f
+lib/intl/dgettext.c    f
+lib/intl/dngettext.c   f
+lib/intl/eval-plural.h f
+lib/intl/explodename.c f
+lib/intl/finddomain.c  f
+lib/intl/gettext.c     f
+lib/intl/gettextP.h    f
+lib/intl/gmo.h         f
+lib/intl/hash-string.h f
+lib/intl/intl-compat.c f
+lib/intl/l10nflist.c   f
+lib/intl/libgnuintl.h.in       f
+lib/intl/loadinfo.h    f
+lib/intl/loadmsgcat.c  f
+lib/intl/localcharset.c        f
+lib/intl/localcharset.h        f
+lib/intl/locale.alias  f
+lib/intl/localealias.c f
+lib/intl/localename.c  f
+lib/intl/log.c         f
+lib/intl/ngettext.c    f
+lib/intl/os2compat.c   f
+lib/intl/os2compat.h   f
+lib/intl/osdep.c       f
+lib/intl/plural-exp.c  f
+lib/intl/plural-exp.h  f
+lib/intl/plural.c      f
+lib/intl/plural.y      f
+lib/intl/ref-add.sin   f
+lib/intl/ref-del.sin   f
+lib/intl/relocatable.c f
+lib/intl/relocatable.h f
+lib/intl/textdomain.c  f
+lib/malloc/Makefile.in f
+lib/malloc/getpagesize.h       f
+lib/malloc/imalloc.h   f
+lib/malloc/mstats.h    f
+lib/malloc/shmalloc.h  f
+lib/malloc/table.h     f
+lib/malloc/watch.h     f
+lib/malloc/alloca.c    f
+lib/malloc/malloc.c    f
+lib/malloc/stats.c     f
+lib/malloc/table.c     f
+lib/malloc/trace.c     f
+lib/malloc/watch.c     f
+lib/malloc/xmalloc.c   f
+lib/malloc/xleaktrace  f       755
+lib/malloc/stub.c      f
+lib/malloc/i386-alloca.s       f
+lib/malloc/x386-alloca.s       f
+lib/readline/COPYING   f
+lib/readline/Makefile.in       f
+lib/readline/ChangeLog f
+lib/readline/README    f
+lib/readline/STANDALONE f
+lib/readline/readline.c        f
+lib/readline/vi_mode.c f
+lib/readline/emacs_keymap.c    f
+lib/readline/vi_keymap.c       f
+lib/readline/history.c f
+lib/readline/histexpand.c      f
+lib/readline/histsearch.c      f
+lib/readline/histfile.c        f
+lib/readline/funmap.c  f
+lib/readline/keymaps.c f
+lib/readline/util.c    f
+lib/readline/terminal.c        f
+lib/readline/xfree.c   f
+lib/readline/xmalloc.c f
+lib/readline/search.c  f
+lib/readline/isearch.c f
+lib/readline/parens.c  f
+lib/readline/rltty.c   f
+lib/readline/compat.c  f
+lib/readline/complete.c        f
+lib/readline/bind.c    f
+lib/readline/display.c f
+lib/readline/signals.c f
+lib/readline/kill.c    f
+lib/readline/text.c    f
+lib/readline/undo.c    f
+lib/readline/macro.c   f
+lib/readline/input.c   f
+lib/readline/callback.c        f
+lib/readline/mbutil.c  f
+lib/readline/misc.c    f
+lib/readline/nls.c     f
+lib/readline/shell.c   f
+lib/readline/savestring.c      f
+lib/readline/tilde.c   f
+lib/readline/tilde.h   f
+lib/readline/rldefs.h  f
+lib/readline/rlconf.h  f
+lib/readline/rlmbutil.h        f
+lib/readline/rlshell.h f
+lib/readline/rltty.h   f
+lib/readline/rltypedefs.h      f
+lib/readline/rlwinsize.h       f
+lib/readline/readline.h        f
+lib/readline/tcap.h    f
+lib/readline/keymaps.h f
+lib/readline/history.h f
+lib/readline/histlib.h f
+lib/readline/chardefs.h        f
+lib/readline/posixdir.h        f
+lib/readline/posixjmp.h        f
+lib/readline/posixselect.h     f
+lib/readline/posixstat.h       f
+lib/readline/ansi_stdlib.h     f
+lib/readline/rlstdc.h  f
+lib/readline/rlprivate.h       f
+lib/readline/xmalloc.h f
+lib/readline/doc/Makefile      f
+lib/readline/doc/version.texi  f
+lib/readline/doc/rlman.texi    f
+lib/readline/doc/rltech.texi   f
+lib/readline/doc/rluser.texi   f
+lib/readline/doc/rluserman.texi        f
+lib/readline/doc/history.texi  f
+lib/readline/doc/hstech.texi   f
+lib/readline/doc/hsuser.texi   f
+lib/readline/doc/fdl.texi      f
+lib/readline/examples/Makefile f
+lib/readline/examples/excallback.c     f
+lib/readline/examples/fileman.c        f
+lib/readline/examples/manexamp.c       f
+lib/readline/examples/histexamp.c      f
+lib/readline/examples/rltest.c f
+lib/readline/examples/rl.c     f
+lib/readline/examples/rlcat.c  f
+lib/readline/examples/Inputrc  f
+lib/sh/Makefile.in     f
+lib/sh/casemod.c       f
+lib/sh/clktck.c                f
+lib/sh/clock.c         f
+lib/sh/dprintf.c       f
+lib/sh/eaccess.c       f
+lib/sh/fmtullong.c     f
+lib/sh/fmtulong.c      f
+lib/sh/fmtumax.c       f
+lib/sh/fnxform.c       f
+lib/sh/fpurge.c                f
+lib/sh/getcwd.c                f
+lib/sh/getenv.c                f
+lib/sh/inet_aton.c     f
+lib/sh/input_avail.c   f
+lib/sh/itos.c          f
+lib/sh/mailstat.c      f
+lib/sh/makepath.c      f
+lib/sh/mbscasecmp.c    f
+lib/sh/mbschr.c                f
+lib/sh/mbscmp.c                f
+lib/sh/memset.c                f
+lib/sh/mktime.c                f
+lib/sh/netconn.c       f
+lib/sh/netopen.c       f
+lib/sh/oslib.c         f
+lib/sh/pathcanon.c     f
+lib/sh/pathphys.c      f
+lib/sh/rename.c                f
+lib/sh/setlinebuf.c    f
+lib/sh/shmatch.c       f
+lib/sh/shmbchar.c      f
+lib/sh/shquote.c       f
+lib/sh/shtty.c         f
+lib/sh/snprintf.c      f
+lib/sh/spell.c         f
+lib/sh/strcasecmp.c    f
+lib/sh/strcasestr.c    f
+lib/sh/strchrnul.c     f
+lib/sh/strerror.c      f
+lib/sh/strftime.c      f
+lib/sh/stringlist.c    f
+lib/sh/stringvec.c     f
+lib/sh/strnlen.c       f
+lib/sh/strpbrk.c       f
+lib/sh/strstr.c                f
+lib/sh/strtod.c                f
+lib/sh/strtoimax.c     f
+lib/sh/strtol.c                f
+lib/sh/strtoll.c       f
+lib/sh/strtoul.c       f
+lib/sh/strtoull.c      f
+lib/sh/strtoumax.c     f
+lib/sh/strtrans.c      f
+lib/sh/times.c         f
+lib/sh/timeval.c       f
+lib/sh/tmpfile.c       f
+lib/sh/uconvert.c      f
+lib/sh/ufuncs.c                f
+lib/sh/unicode.c       f
+lib/sh/vprint.c                f
+lib/sh/wcsdup.c                f
+lib/sh/wcswidth.c      f
+lib/sh/winsize.c       f
+lib/sh/zcatfd.c                f
+lib/sh/zgetline.c      f
+lib/sh/zmapfd.c                f
+lib/sh/zread.c         f
+lib/sh/zwrite.c                f
+lib/termcap/Makefile.in        f
+lib/termcap/ltcap.h    f
+lib/termcap/termcap.c  f
+lib/termcap/termcap.h  f
+lib/termcap/tparam.c   f
+lib/termcap/version.c  f
+lib/tilde/README       f
+lib/tilde/Makefile.in  f
+lib/tilde/tilde.c      f
+lib/tilde/tilde.h      f
+lib/tilde/shell.c      f
+po/LINGUAS             f
+po/Makefile.in.in      f
+po/Makevars            f
+po/POTFILES.in         f
+po/README              f
+po/Rules-builtins      f
+po/Rules-quot          f
+po/bash.pot            f
+po/boldquot.sed                f
+po/en@boldquot.gmo     f
+po/en@boldquot.header  f
+po/en@boldquot.po      f
+po/en@quot.gmo         f
+po/en@quot.header      f
+po/en@quot.po          f
+po/af.gmo              f
+po/af.po               f
+po/bg.gmo              f
+po/bg.po               f
+po/ca.gmo              f
+po/ca.po               f
+po/cs.gmo              f
+po/cs.po               f
+po/da.gmo              f
+po/da.po               f
+po/de.gmo              f
+po/de.po               f
+po/eo.gmo              f
+po/eo.po               f
+po/es.gmo              f
+po/es.po               f
+po/et.gmo              f
+po/et.po               f
+po/fi.gmo              f
+po/fi.po               f
+po/fr.gmo              f
+po/fr.po               f
+po/ga.gmo              f
+po/ga.po               f
+po/hu.gmo              f
+po/hu.po               f
+po/id.gmo              f
+po/id.po               f
+po/ja.gmo              f
+po/ja.po               f
+po/lt.gmo              f
+po/lt.po               f
+po/nl.gmo              f
+po/nl.po               f
+po/pl.gmo              f
+po/pl.po               f
+po/pt_BR.gmo           f
+po/pt_BR.po            f
+po/ro.gmo              f
+po/ro.po               f
+po/ru.gmo              f
+po/ru.po               f
+po/sk.gmo              f
+po/sk.po               f
+po/sl.gmo              f
+po/sl.po               f
+po/sv.gmo              f
+po/sv.po               f
+po/tr.gmo              f
+po/tr.po               f
+po/uk.gmo              f
+po/uk.po               f
+po/vi.gmo              f
+po/vi.po               f
+po/zh_CN.gmo           f
+po/zh_CN.po            f
+po/zh_TW.gmo           f
+po/zh_TW.po            f
+po/insert-header.sin   f
+po/quot.sed            f
+po/remove-potcdate.sin f
+CWRU/misc/open-files.c f
+CWRU/misc/sigs.c       f
+CWRU/misc/sigstat.c    f
+CWRU/misc/bison                f
+CWRU/misc/errlist.c    f
+CWRU/misc/hpux10-dlfcn.h       f
+CWRU/PLATFORMS         f
+CWRU/README            f
+CWRU/changelog         f
+CWRU/sh-redir-hack     f
+CWRU/mh-folder-comp    f
+doc/FAQ                f
+doc/Makefile.in        f
+doc/bash.1     f
+doc/bashbug.1  f
+doc/builtins.1 f
+doc/rbash.1    f
+doc/README     f
+doc/INTRO      f
+doc/texinfo.tex        f
+doc/bashref.texi       f
+doc/version.texi       f
+doc/bashref.info       f
+doc/article.ms f
+doc/htmlpost.sh        f       755
+doc/infopost.sh        f       755
+doc/fdl.texi   f
+doc/fdl.txt    f
+support/Makefile.in    f
+support/bashversion.c  f
+support/checkbashisms  f       755
+support/config.guess   f
+support/config.rpath   f       755
+support/config.sub     f
+support/printenv.sh    f       755
+support/printenv.c     f
+support/bash.xbm       f
+support/missing                f       755
+support/mkclone                f       755
+support/mkconffiles    f       755
+support/mkdirs         f       755
+support/mkinstalldirs  f       755
+support/mkversion.sh   f       755
+support/mksignames.c   f
+support/signames.c     f
+support/bashbug.sh     f
+support/man2html.c     f
+support/recho.c                f
+support/zecho.c                f
+support/xcase.c                f
+support/SYMLINKS       f
+support/fixlinks       f       755
+support/install.sh     f       755
+support/texi2dvi       f       755
+support/texi2html      f       755
+support/xenix-link.sh  f       755
+support/shobj-conf     f       755
+support/rlvers.sh      f       755
+examples/INDEX.txt     f
+examples/INDEX.html    f
+examples/obashdb/PERMISSION    f
+examples/obashdb/README        f
+examples/obashdb/bashdb                f
+examples/obashdb/bashdb.el     f
+examples/complete/bash_completion      f
+examples/complete/complete-examples    f
+examples/complete/complete.ianmac      f
+examples/complete/complete2.ianmac     f
+examples/complete/complete.freebsd     f
+examples/complete/complete.gnu-longopt f
+examples/complete/bashcc-1.0.1.tar.gz  f
+examples/loadables/README      f
+examples/loadables/template.c  f
+examples/loadables/Makefile.in f
+examples/loadables/necho.c     f
+examples/loadables/hello.c     f
+examples/loadables/print.c     f
+examples/loadables/realpath.c  f
+examples/loadables/sleep.c     f
+examples/loadables/strftime.c  f
+examples/loadables/truefalse.c f
+examples/loadables/getconf.h   f
+examples/loadables/getconf.c   f
+examples/loadables/finfo.c     f
+examples/loadables/cat.c       f
+examples/loadables/cut.c       f
+examples/loadables/logname.c   f
+examples/loadables/basename.c  f
+examples/loadables/dirname.c   f
+examples/loadables/tty.c       f
+examples/loadables/pathchk.c   f
+examples/loadables/tee.c       f
+examples/loadables/rmdir.c     f
+examples/loadables/head.c      f
+examples/loadables/printenv.c  f
+examples/loadables/push.c      f
+examples/loadables/id.c                f
+examples/loadables/whoami.c    f
+examples/loadables/uname.c     f
+examples/loadables/sync.c      f
+examples/loadables/mkdir.c     f
+examples/loadables/ln.c                f
+examples/loadables/mypid.c     f
+examples/loadables/unlink.c    f
+examples/loadables/perl/Makefile.in    f
+examples/loadables/perl/README f
+examples/loadables/perl/bperl.c        f
+examples/loadables/perl/iperl.c        f
+examples/functions/array-stuff f
+examples/functions/array-to-string     f
+examples/functions/autoload    f
+examples/functions/autoload.v2 f
+examples/functions/autoload.v3 f
+examples/functions/basename    f
+examples/functions/basename2   f
+examples/functions/coproc.bash f
+examples/functions/coshell.README      f
+examples/functions/coshell.bash        f
+examples/functions/csh-compat  f
+examples/functions/dirfuncs    f
+examples/functions/dirname     f
+examples/functions/emptydir    f
+examples/functions/exitstat    f
+examples/functions/external    f
+examples/functions/fact                f
+examples/functions/fstty       f
+examples/functions/func                f
+examples/functions/gethtml     f
+examples/functions/getoptx.bash        f
+examples/functions/inetaddr    f
+examples/functions/inpath      f
+examples/functions/isnum.bash  f
+examples/functions/isnum2      f
+examples/functions/isvalidip   f
+examples/functions/jdate.bash  f
+examples/functions/jj.bash     f
+examples/functions/keep                f
+examples/functions/ksh-cd      f
+examples/functions/ksh-compat-test     f
+examples/functions/kshenv      f
+examples/functions/login       f
+examples/functions/lowercase   f
+examples/functions/manpage     f
+examples/functions/mhfold      f
+examples/functions/notify.bash f
+examples/functions/pathfuncs   f
+examples/functions/recurse     f
+examples/functions/repeat2     f
+examples/functions/repeat3     f
+examples/functions/seq         f
+examples/functions/seq2                f
+examples/functions/shcat       f
+examples/functions/shcat2      f
+examples/functions/sort-pos-params     f
+examples/functions/substr      f
+examples/functions/substr2     f
+examples/functions/term                f
+examples/functions/whatis      f
+examples/functions/whence      f
+examples/functions/which       f
+examples/functions/xalias.bash f
+examples/functions/xfind.bash  f
+examples/scripts/adventure.sh  f
+examples/scripts/bash-hexdump.sh       f
+examples/scripts/bcsh.sh       f
+examples/scripts/cat.sh                f
+examples/scripts/center                f
+examples/scripts/dd-ex.sh      f
+examples/scripts/fixfiles.bash f
+examples/scripts/hanoi.bash    f
+examples/scripts/inpath                f
+examples/scripts/krand.bash    f
+examples/scripts/line-input.bash       f
+examples/scripts/nohup.bash    f
+examples/scripts/precedence    f
+examples/scripts/randomcard.bash       f
+examples/scripts/scrollbar     f
+examples/scripts/scrollbar2    f
+examples/scripts/self-repro    f
+examples/scripts/showperm.bash f
+examples/scripts/shprompt      f
+examples/scripts/spin.bash     f
+examples/scripts/timeout       f
+examples/scripts/timeout2      f
+examples/scripts/timeout3      f
+examples/scripts/vtree2                f
+examples/scripts/vtree3                f
+examples/scripts/vtree3a       f
+examples/scripts/websrv.sh     f
+examples/scripts/xterm_title   f
+examples/scripts/zprintf       f
+examples/startup-files/README  f
+examples/startup-files/Bashrc.bfox     f
+examples/startup-files/Bash_aliases    f
+examples/startup-files/Bash_profile    f
+examples/startup-files/bash-profile    f
+examples/startup-files/bashrc  f
+examples/startup-files/apple/README    f
+examples/startup-files/apple/aliases   f
+examples/startup-files/apple/bash.defaults     f
+examples/startup-files/apple/environment       f
+examples/startup-files/apple/login     f
+examples/startup-files/apple/logout    f
+examples/startup-files/apple/rc                f
+examples/misc/suncmd.termcap   f
+examples/misc/aliasconv.sh     f
+examples/misc/aliasconv.bash   f
+examples/misc/cshtobash        f
+tests/README           f
+tests/COPYRIGHT                f
+tests/alias.tests      f
+tests/alias1.sub       f
+tests/alias.right      f
+tests/appendop.tests   f
+tests/appendop.right   f
+tests/arith-for.tests  f
+tests/arith-for.right  f
+tests/arith.tests      f
+tests/arith.right      f
+tests/arith1.sub       f
+tests/arith2.sub       f
+tests/arith3.sub       f
+tests/arith4.sub       f
+tests/arith5.sub       f
+tests/array.tests      f
+tests/array.right      f
+tests/array1.sub       f
+tests/array2.sub       f
+tests/array3.sub       f
+tests/array4.sub       f
+tests/array5.sub       f
+tests/array6.sub       f
+tests/array7.sub       f
+tests/array8.sub       f
+tests/array9.sub       f
+tests/array10.sub      f
+tests/array11.sub      f
+tests/array12.sub      f
+tests/array-at-star    f
+tests/array2.right     f
+tests/assoc.tests      f
+tests/assoc.right      f
+tests/assoc1.sub       f
+tests/assoc2.sub       f
+tests/assoc3.sub       f
+tests/assoc4.sub       f
+tests/assoc5.sub       f
+tests/assoc6.sub       f
+tests/braces.tests     f
+tests/braces.right     f
+tests/builtins.tests   f
+tests/builtins.right   f
+tests/builtins1.sub    f
+tests/builtins2.sub    f
+tests/builtins3.sub    f
+tests/source1.sub      f
+tests/source2.sub      f
+tests/source3.sub      f
+tests/source4.sub      f
+tests/source5.sub      f
+tests/source6.sub      f
+tests/case.tests       f
+tests/case.right       f
+tests/casemod.tests    f
+tests/casemod.right    f
+tests/comsub.tests     f
+tests/comsub.right     f
+tests/comsub1.sub      f
+tests/comsub-eof.tests f
+tests/comsub-eof0.sub  f
+tests/comsub-eof1.sub  f
+tests/comsub-eof2.sub  f
+tests/comsub-eof3.sub  f
+tests/comsub-eof4.sub  f
+tests/comsub-eof5.sub  f
+tests/comsub-eof.right f
+tests/comsub-posix.tests       f
+tests/comsub-posix.right       f
+tests/comsub-posix1.sub        f
+tests/comsub-posix2.sub        f
+tests/comsub-posix3.sub        f
+tests/cond.tests       f
+tests/cond.right       f
+tests/cond-regexp.sub  f
+tests/cond-regexp2.sub f
+tests/coproc.tests     f
+tests/coproc.right     f
+tests/cprint.tests     f
+tests/cprint.right     f
+tests/dbg-support.right        f
+tests/dbg-support.sub  f
+tests/dbg-support.tests        f
+tests/dbg-support2.right       f
+tests/dbg-support2.tests       f
+tests/dbg-support3.sub f
+tests/dollar-at-star   f
+tests/dollar-at1.sub   f
+tests/dollar-at2.sub   f
+tests/dollar-at3.sub   f
+tests/dollar-at4.sub   f
+tests/dollar-star1.sub f
+tests/dollar-star2.sub f
+tests/dollar-star3.sub f
+tests/dollar-star4.sub f
+tests/dollar-star5.sub f
+tests/dollar.right     f
+tests/dstack.tests     f
+tests/dstack.right     f
+tests/dstack2.tests    f
+tests/dstack2.right    f
+tests/errors.tests     f
+tests/errors.right     f
+tests/errors1.sub      f
+tests/execscript       f
+tests/exec.right       f
+tests/exec1.sub                f       755
+tests/exec2.sub                f
+tests/exec3.sub                f
+tests/exec4.sub                f
+tests/exec5.sub                f
+tests/exec6.sub                f
+tests/exec7.sub                f
+tests/exec8.sub                f
+tests/exec9.sub                f
+tests/exp.tests                f
+tests/exp.right                f
+tests/exp1.sub         f
+tests/exp2.sub         f
+tests/exp3.sub         f
+tests/exp4.sub         f
+tests/exp5.sub         f
+tests/exp6.sub         f
+tests/extglob.tests    f
+tests/extglob.right    f
+tests/extglob1.sub     f
+tests/extglob2.tests   f
+tests/extglob2.right   f
+tests/extglob3.tests   f
+tests/extglob3.right   f
+tests/func.tests       f
+tests/func.right       f
+tests/func1.sub                f
+tests/func2.sub                f
+tests/func3.sub                f
+tests/func4.sub                f
+tests/getopts.tests    f
+tests/getopts.right    f
+tests/getopts1.sub     f
+tests/getopts2.sub     f
+tests/getopts3.sub     f
+tests/getopts4.sub     f
+tests/getopts5.sub     f
+tests/getopts6.sub     f
+tests/getopts7.sub     f
+tests/glob.tests       f
+tests/glob1.sub                f
+tests/glob.right       f
+tests/globstar.tests   f
+tests/globstar.right   f
+tests/globstar1.sub    f
+tests/heredoc.tests    f
+tests/heredoc.right    f
+tests/heredoc1.sub     f
+tests/heredoc2.sub     f
+tests/heredoc3.sub     f
+tests/herestr.tests    f
+tests/herestr.right    f
+tests/histexp.tests    f
+tests/histexp.right    f
+tests/history.tests    f
+tests/history.right    f
+tests/history.list     f       444
+tests/history1.sub     f
+tests/history2.sub     f
+tests/ifs.tests                f
+tests/ifs.right                f
+tests/ifs-posix.tests  f
+tests/ifs-posix.right  f
+tests/input-line.sh    f
+tests/input-line.sub   f
+tests/input.right      f
+tests/intl.tests       f
+tests/intl1.sub                f
+tests/intl2.sub                f
+tests/intl.right       f
+tests/iquote.tests     f
+tests/iquote.right     f
+tests/invert.tests     f
+tests/invert.right     f
+tests/jobs.tests       f
+tests/jobs1.sub                f
+tests/jobs2.sub                f
+tests/jobs3.sub                f
+tests/jobs4.sub                f
+tests/jobs.right       f
+tests/lastpipe.right   f
+tests/lastpipe.tests   f
+tests/lastpipe1.sub    f
+tests/mapfile.data     f
+tests/mapfile.right    f
+tests/mapfile.tests    f
+tests/mapfile1.sub     f
+tests/more-exp.tests   f
+tests/more-exp.right   f
+tests/new-exp.tests    f
+tests/new-exp1.sub     f
+tests/new-exp2.sub     f
+tests/new-exp3.sub     f
+tests/new-exp4.sub     f
+tests/new-exp5.sub     f
+tests/new-exp6.sub     f
+tests/new-exp7.sub     f
+tests/new-exp8.sub     f
+tests/new-exp.right    f
+tests/nquote.tests     f
+tests/nquote.right     f
+tests/nquote1.sub      f
+tests/nquote1.tests    f
+tests/nquote1.right    f
+tests/nquote2.tests    f
+tests/nquote2.right    f
+tests/nquote3.tests    f
+tests/nquote3.right    f
+tests/nquote4.tests    f
+tests/nquote4.right    f
+tests/nquote5.tests    f
+tests/nquote5.right    f
+tests/posix2.tests     f
+tests/posix2.right     f
+tests/posixexp.tests   f
+tests/posixexp.right   f
+tests/posixexp1.sub    f
+tests/posixexp2.sub    f
+tests/posixexp2.tests  f
+tests/posixexp2.right  f
+tests/posixpat.tests   f
+tests/posixpat.right   f
+tests/posixpipe.tests  f
+tests/posixpipe.right  f
+tests/prec.right       f
+tests/precedence       f
+tests/printf.tests     f
+tests/printf.right     f
+tests/printf1.sub      f
+tests/printf2.sub      f
+tests/printf3.sub      f
+tests/quote.tests      f
+tests/quote.right      f
+tests/read.tests       f
+tests/read.right       f
+tests/read1.sub                f
+tests/read2.sub                f
+tests/read3.sub                f
+tests/read4.sub                f
+tests/read5.sub                f
+tests/read6.sub                f
+tests/redir.tests      f
+tests/redir.right      f
+tests/redir1.sub       f
+tests/redir2.sub       f
+tests/redir3.sub       f
+tests/redir3.in1       f
+tests/redir3.in2       f
+tests/redir4.sub       f
+tests/redir4.in1       f
+tests/redir5.sub       f
+tests/redir6.sub       f
+tests/redir7.sub       f
+tests/redir8.sub       f
+tests/redir9.sub       f
+tests/redir10.sub      f
+tests/rhs-exp.tests    f
+tests/rhs-exp.right    f
+tests/rhs-exp1.sub     f
+tests/rsh.tests                f
+tests/rsh.right                f
+tests/run-all          f
+tests/run-minimal      f
+tests/run-alias                f
+tests/run-appendop     f
+tests/run-arith-for    f
+tests/run-arith                f
+tests/run-array                f
+tests/run-array2       f
+tests/run-assoc                f
+tests/run-braces       f
+tests/run-builtins     f
+tests/run-case         f
+tests/run-casemod      f
+tests/run-comsub       f
+tests/run-comsub-eof   f
+tests/run-comsub-posix f
+tests/run-cond         f
+tests/run-coproc       f
+tests/run-cprint       f
+tests/run-dbg-support  f
+tests/run-dbg-support2 f
+tests/run-dirstack     f
+tests/run-dollars      f
+tests/run-errors       f
+tests/run-execscript   f
+tests/run-exp-tests    f
+tests/run-extglob      f
+tests/run-extglob2     f
+tests/run-extglob3     f
+tests/run-func         f
+tests/run-getopts      f
+tests/run-glob-test    f
+tests/run-globstar     f
+tests/run-heredoc      f
+tests/run-herestr      f
+tests/run-histexpand   f
+tests/run-history      f
+tests/run-ifs          f
+tests/run-ifs-posix    f
+tests/run-input-test   f
+tests/run-intl         f
+tests/run-iquote       f
+tests/run-invert       f
+tests/run-jobs         f
+tests/run-lastpipe     f
+tests/run-mapfile      f
+tests/run-more-exp     f
+tests/run-new-exp      f
+tests/run-nquote       f
+tests/run-nquote1      f
+tests/run-nquote2      f
+tests/run-nquote3      f
+tests/run-nquote4      f
+tests/run-nquote5      f
+tests/run-posix2       f
+tests/run-posixexp     f
+tests/run-posixexp2    f
+tests/run-posixpat     f
+tests/run-posixpipe    f
+tests/run-precedence   f
+tests/run-printf       f
+tests/run-quote                f
+tests/run-read         f
+tests/run-redir                f
+tests/run-rhs-exp      f
+tests/run-rsh          f
+tests/run-set-e                f
+tests/run-set-x                f
+tests/run-shopt                f
+tests/run-strip                f
+tests/run-test         f
+tests/run-tilde                f
+tests/run-tilde2       f
+tests/run-trap         f
+tests/run-type         f
+tests/run-varenv       f
+tests/run-vredir       f
+tests/set-e.tests      f
+tests/set-e1.sub       f
+tests/set-e2.sub       f
+tests/set-e.right      f
+tests/set-x.tests      f
+tests/set-x1.sub       f
+tests/set-x.right      f
+tests/shopt.tests      f       
+tests/shopt.right      f
+tests/strip.tests      f
+tests/strip.right      f
+tests/test.tests       f
+tests/test.right       f
+tests/tilde.tests      f
+tests/tilde.right      f
+tests/tilde2.tests     f
+tests/tilde2.right     f
+tests/trap.tests       f
+tests/trap.right       f
+tests/trap1.sub                f       755
+tests/trap2.sub                f       755
+tests/trap2a.sub       f       755
+tests/trap3.sub                f
+tests/type.tests       f
+tests/type.right       f
+tests/type1.sub                f
+tests/type2.sub                f
+tests/type3.sub                f
+tests/type4.sub                f
+tests/varenv.right     f
+tests/varenv.sh                f
+tests/varenv1.sub      f
+tests/varenv2.sub      f
+tests/version          f
+tests/version.mini     f
+tests/vredir.tests     f
+tests/vredir.right     f
+tests/vredir1.sub      f
+tests/vredir2.sub      f
+tests/vredir3.sub      f
+tests/vredir4.sub      f
+tests/vredir5.sub      f
+tests/vredir6.sub      f
+tests/misc/dev-tcp.tests       f
+tests/misc/perf-script f
+tests/misc/perftest    f
+tests/misc/read-nchars.tests   f
+tests/misc/redir-t2.sh f
+tests/misc/run-r2.sh   f
+tests/misc/sigint-1.sh         f
+tests/misc/sigint-2.sh         f
+tests/misc/sigint-3.sh         f
+tests/misc/sigint-4.sh         f
+tests/misc/test-minus-e.1      f
+tests/misc/test-minus-e.2      f
+tests/misc/wait-bg.tests       f
+examples/scripts.v2/PERMISSION f
+examples/scripts.v2/README     f
+examples/scripts.v2/arc2tarz   f
+examples/scripts.v2/bashrand   f
+examples/scripts.v2/cal2day.bash       f
+examples/scripts.v2/cdhist.bash        f
+examples/scripts.v2/corename   f
+examples/scripts.v2/fman       f
+examples/scripts.v2/frcp       f
+examples/scripts.v2/lowercase  f
+examples/scripts.v2/ncp        f
+examples/scripts.v2/newext     f
+examples/scripts.v2/nmv        f
+examples/scripts.v2/pages      f
+examples/scripts.v2/pf f
+examples/scripts.v2/ren                f
+examples/scripts.v2/rename     f
+examples/scripts.v2/repeat     f
+examples/scripts.v2/untar      f
+examples/scripts.v2/uudec      f
+examples/scripts.v2/uuenc      f
+examples/scripts.v2/vtree      f
+examples/scripts.v2/where      f
+examples/scripts.v2/pmtop      f
+examples/scripts.v2/shprof     f
+examples/scripts.noah/PERMISSION       f
+examples/scripts.noah/README   f
+examples/scripts.noah/aref.bash        f
+examples/scripts.noah/bash.sub.bash    f
+examples/scripts.noah/bash_version.bash        f
+examples/scripts.noah/meta.bash        f
+examples/scripts.noah/mktmp.bash       f
+examples/scripts.noah/number.bash      f
+examples/scripts.noah/prompt.bash      f
+examples/scripts.noah/remap_keys.bash  f
+examples/scripts.noah/require.bash     f
+examples/scripts.noah/send_mail.bash   f
+examples/scripts.noah/shcat.bash       f
+examples/scripts.noah/source.bash      f
+examples/scripts.noah/string.bash      f
+examples/scripts.noah/stty.bash        f
+examples/scripts.noah/y_or_n_p.bash    f
index c6cfaaf7b8c9e8a404ca4f9aa56ad3d5700d31ab..135888176ba71e2124bbd61658a3728c0ea93873 100644 (file)
@@ -5,12 +5,12 @@
 .\"    Case Western Reserve University
 .\"    chet@po.cwru.edu
 .\"
-.\"    Last Change: Sat Nov 12 13:34:37 EST 2011
+.\"    Last Change: Sat Nov 19 15:15:30 EST 2011
 .\"
 .\" bash_builtins, strip all but Built-Ins section
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH BASH 1 "2011 November 12" "GNU Bash 4.2"
+.TH BASH 1 "2011 November 19" "GNU Bash 4.2"
 .\"
 .\" There's some problem with having a `@'
 .\" in a tagged paragraph with the BSD man macros.
@@ -1976,10 +1976,14 @@ command history is not saved when an interactive shell exits.
 .B HISTFILESIZE
 The maximum number of lines contained in the history file.  When this
 variable is assigned a value, the history file is truncated, if
-necessary, by removing the oldest entries,
-to contain no more than that number of lines.  The default
-value is 500.  The history file is also truncated to this size after
+necessary,
+to contain no more than that number of lines by removing the oldest entries.
+The history file is also truncated to this size after
 writing it when an interactive shell exits.
+If the value is 0, the history file is truncated to zero size.
+Numeric values less than zero inhibit truncation.
+The shell sets the default value to the value of \fBHISTSIZE\fP
+after reading any startup files.
 .TP
 .B HISTIGNORE
 A colon-separated list of patterns used to decide which command lines
@@ -2002,7 +2006,11 @@ not tested, and are added to the history regardless of the value of
 The number of commands to remember in the command history (see
 .SM
 .B HISTORY
-below).  The default value is 500.
+below).
+If the value is 0, commands are not saved in the history list.
+Numeric values less than zero result in every command being saved
+on the history list (there is no limit).
+The shell sets the default value to 500 after reading any startup files.
 .TP
 .B HISTTIMEFORMAT
 If this variable is set and not null, its value is used as a format string
@@ -6241,6 +6249,8 @@ is truncated, if necessary, to contain no more than
 the number of lines specified by the value of
 .SM
 .BR HISTFILESIZE .
+If \fBHISTFILESIZE\fP is unset, or set to null, a non-numeric value,
+or a numeric value less than zero, the history file is not truncated.
 When the history file is read,
 lines beginning with the history comment character followed immediately
 by a digit are interpreted as timestamps for the preceding history line.
index 95e755b4fa1f7c823d6665661ed18467f53cf792..3689cac34c50f7c486453b1a3c91903489c2ac11 100644 (file)
@@ -5,12 +5,12 @@
 .\"    Case Western Reserve University
 .\"    chet@po.cwru.edu
 .\"
-.\"    Last Change: Sat Nov 12 13:34:37 EST 2011
+.\"    Last Change: Sat Nov 19 15:15:30 EST 2011
 .\"
 .\" bash_builtins, strip all but Built-Ins section
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH BASH 1 "2011 November 12" "GNU Bash 4.2"
+.TH BASH 1 "2011 November 19" "GNU Bash 4.2"
 .\"
 .\" There's some problem with having a `@'
 .\" in a tagged paragraph with the BSD man macros.
@@ -729,6 +729,8 @@ is enabled, the match is performed without regard to the case
 of alphabetic characters.
 Any part of the pattern may be quoted to force the quoted portion
 to be matched as a string.
+Bracket expressions in regular expressions must be treated carefully,
+since normal quoting characters lose their meanings between brackets.
 If the pattern is stored in a shell variable, quoting the variable
 expansion forces the entire pattern to be matched as a string.
 Substrings matched by parenthesized subexpressions within the regular
@@ -1974,10 +1976,14 @@ command history is not saved when an interactive shell exits.
 .B HISTFILESIZE
 The maximum number of lines contained in the history file.  When this
 variable is assigned a value, the history file is truncated, if
-necessary, by removing the oldest entries,
-to contain no more than that number of lines.  The default
-value is 500.  The history file is also truncated to this size after
+necessary,
+to contain no more than that number of lines by removing the oldest entries.
+The history file is also truncated to this size after
 writing it when an interactive shell exits.
+If the value is 0, the history file is truncated to zero size.
+Numeric values less than zero are treated as 0.
+The shell sets the default value to the value of \fBHISTSIZE\fP
+after reading any startup files.
 .TP
 .B HISTIGNORE
 A colon-separated list of patterns used to decide which command lines
@@ -2000,7 +2006,11 @@ not tested, and are added to the history regardless of the value of
 The number of commands to remember in the command history (see
 .SM
 .B HISTORY
-below).  The default value is 500.
+below).
+If the value is 0, commands are not saved in the history list.
+Numeric values less than zero result in every command being saved
+on the history list (there is no limit).
+The shell sets the default value to 500 after reading any startup files.
 .TP
 .B HISTTIMEFORMAT
 If this variable is set and not null, its value is used as a format string
@@ -6239,6 +6249,8 @@ is truncated, if necessary, to contain no more than
 the number of lines specified by the value of
 .SM
 .BR HISTFILESIZE .
+If \fBHISTFILESIZE\fP is unset, or set to a null or non-numeric value,
+the history file is not truncated.
 When the history file is read,
 lines beginning with the history comment character followed immediately
 by a digit are interpreted as timestamps for the preceding history line.
index 494c30221ad56c1446a7c0369a34f6f2be1d7924..0e8127b8020cc797eb6a876a16ff75e0ec1d9d36 100644 (file)
@@ -5306,13 +5306,16 @@ The name of the file to which the command history is saved.  The
 default value is @file{~/.bash_history}.
 
 @item HISTFILESIZE
-The maximum number of lines contained in the history file.  When this
-variable is assigned a value, the history file is truncated, if
-necessary, by removing the oldest entries,
-to contain no more than that number of lines.
+The maximum number of lines contained in the history file.
+When this variable is assigned a value, the history file is truncated,
+if necessary, to contain no more than that number of lines
+by removing the oldest entries.
 The history file is also truncated to this size after
 writing it when an interactive shell exits.
-The default value is 500.
+If the value is 0, the history file is truncated to zero size.
+Numeric values less than zero inhibit truncation.
+The shell sets the default value to the value of @env{HISTSIZE}
+after reading any startup files.
 
 @item HISTIGNORE
 A colon-separated list of patterns used to decide which command
@@ -5336,7 +5339,10 @@ provides the functionality of @code{ignoreboth}.
 
 @item HISTSIZE
 The maximum number of commands to remember on the history list.
-The default value is 500.
+If the value is 0, commands are not saved in the history list.
+Numeric values less than zero result in every command being saved
+on the history list (there is no limit).
+The shell sets the default value to 500 after reading any startup files.
 
 @item HISTTIMEFORMAT
 If this variable is set and not null, its value is used as a format string
index a08ad25e80e8bf7e8fed124b85048d9f50868789..47c2789813efb6ec72d622d40441e5915f9f684c 100644 (file)
@@ -1034,6 +1034,8 @@ is enabled, the match is performed without regard to the case
 of alphabetic characters.
 Any part of the pattern may be quoted to force the quoted portion
 to be matched as a string.
+Bracket expressions in regular expressions must be treated carefully,
+since normal quoting characters lose their meanings between brackets.
 If the pattern is stored in a shell variable, quoting the variable
 expansion forces the entire pattern to be matched as a string.
 Substrings matched by parenthesized subexpressions within the regular
@@ -5304,13 +5306,16 @@ The name of the file to which the command history is saved.  The
 default value is @file{~/.bash_history}.
 
 @item HISTFILESIZE
-The maximum number of lines contained in the history file.  When this
-variable is assigned a value, the history file is truncated, if
-necessary, by removing the oldest entries,
-to contain no more than that number of lines.
+The maximum number of lines contained in the history file.
+When this variable is assigned a value, the history file is truncated,
+if necessary, to contain no more than that number of lines
+by removing the oldest entries.
 The history file is also truncated to this size after
 writing it when an interactive shell exits.
-The default value is 500.
+If the value is 0, the history file is truncated to zero size.
+Numeric values less than zero are treated as 0.
+The shell sets the default value to the value of @env{HISTSIZE}
+after reading any startup files.
 
 @item HISTIGNORE
 A colon-separated list of patterns used to decide which command
@@ -5334,7 +5339,9 @@ provides the functionality of @code{ignoreboth}.
 
 @item HISTSIZE
 The maximum number of commands to remember on the history list.
-The default value is 500.
+If the value is 0, commands are not saved in the history list.
+Numeric values less than zero are treated as 0.
+The shell sets the default value to 500 after reading any startup files.
 
 @item HISTTIMEFORMAT
 If this variable is set and not null, its value is used as a format string
index 1453458a61b7bf9780da06fe2192ce7bd19c931d..048bec5168aba7ef00bf8a8ccf9e6ee28171b634 100644 (file)
@@ -2,9 +2,9 @@
 Copyright (C) 1988-2011 Free Software Foundation, Inc.
 @end ignore
 
-@set LASTCHANGE Sat Nov 12 13:35:12 EST 2011
+@set LASTCHANGE Sat Sat Nov 19 15:15:12 EST 2011
 
 @set EDITION 4.2
 @set VERSION 4.2
-@set UPDATED 12 November 2011
+@set UPDATED 19 November 2011
 @set UPDATED-MONTH November 2011
index 590e8851a4ff5b7a2bee93e0963a459cf2befc7e..1453458a61b7bf9780da06fe2192ce7bd19c931d 100644 (file)
@@ -2,9 +2,9 @@
 Copyright (C) 1988-2011 Free Software Foundation, Inc.
 @end ignore
 
-@set LASTCHANGE Mon Oct 24 08:43:33 EDT 2011
+@set LASTCHANGE Sat Nov 12 13:35:12 EST 2011
 
 @set EDITION 4.2
 @set VERSION 4.2
-@set UPDATED 24 October 2011
-@set UPDATED-MONTH October 2011
+@set UPDATED 12 November 2011
+@set UPDATED-MONTH November 2011
index b999fd9885823fa5a5418cba9ea9a906cf27b673..c5842bcaf250d7ccb409ae73159818f77215b88f 100644 (file)
@@ -91,10 +91,11 @@ If the @code{histappend} shell option is set (@pxref{Bash Builtins}),
 the lines are appended to the history file,
 otherwise the history file is overwritten.
 If @env{HISTFILE}
-is unset, or if the history file is unwritable, the history is
-not saved.  After saving the history, the history file is truncated
-to contain no more than @env{$HISTFILESIZE}
-lines.  If @env{HISTFILESIZE} is not set, no truncation is performed.
+is unset, or if the history file is unwritable, the history is not saved.
+After saving the history, the history file is truncated
+to contain no more than @env{$HISTFILESIZE} lines.
+If @env{HISTFILESIZE} is not set, or set to null, a non-numeric value, or
+a numeric value less than zero, the history file is not truncated.
 
 If the @env{HISTTIMEFORMAT} is set, the time stamp information
 associated with each history entry is written to the history file,
diff --git a/lib/readline/doc/hsuser.texi~ b/lib/readline/doc/hsuser.texi~
new file mode 100644 (file)
index 0000000..e7ca97b
--- /dev/null
@@ -0,0 +1,475 @@
+@ignore
+This file documents the user interface to the GNU History library.
+
+Copyright (C) 1988--2011 Free Software Foundation, Inc.
+Authored by Brian Fox and Chet Ramey.
+
+Permission is granted to make and distribute verbatim copies of this manual
+provided the copyright notice and this permission notice are preserved on
+all copies.
+
+Permission is granted to process this file through Tex and print the
+results, provided the printed document carries copying permission notice
+identical to this one except for the removal of this paragraph (this
+paragraph not being relevant to the printed manual).
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided also that the
+GNU Copyright statement is available to the distributee, and provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions.
+@end ignore
+
+@node Using History Interactively
+@chapter Using History Interactively
+
+@ifclear BashFeatures
+@defcodeindex bt
+@end ifclear
+
+@ifset BashFeatures
+This chapter describes how to use the @sc{gnu} History Library
+interactively, from a user's standpoint.
+It should be considered a user's guide.
+For information on using the @sc{gnu} History Library in other programs,
+see the @sc{gnu} Readline Library Manual.
+@end ifset
+@ifclear BashFeatures
+This chapter describes how to use the @sc{gnu} History Library interactively,
+from a user's standpoint.  It should be considered a user's guide.  For
+information on using the @sc{gnu} History Library in your own programs,
+@pxref{Programming with GNU History}.
+@end ifclear
+
+@ifset BashFeatures
+@menu
+* Bash History Facilities::    How Bash lets you manipulate your command
+                               history.
+* Bash History Builtins::      The Bash builtin commands that manipulate
+                               the command history.
+* History Interaction::                What it feels like using History as a user.
+@end menu
+@end ifset
+@ifclear BashFeatures
+@menu
+* History Interaction::                What it feels like using History as a user.
+@end menu
+@end ifclear
+
+@ifset BashFeatures
+@node Bash History Facilities
+@section Bash History Facilities
+@cindex command history
+@cindex history list
+
+When the @option{-o history} option to the @code{set} builtin
+is enabled (@pxref{The Set Builtin}),
+the shell provides access to the @dfn{command history},
+the list of commands previously typed.
+The value of the @env{HISTSIZE} shell variable is used as the
+number of commands to save in a history list.
+The text of the last @env{$HISTSIZE}
+commands (default 500) is saved.
+The shell stores each command in the history list prior to
+parameter and variable expansion
+but after history expansion is performed, subject to the
+values of the shell variables
+@env{HISTIGNORE} and @env{HISTCONTROL}.
+
+When the shell starts up, the history is initialized from the
+file named by the @env{HISTFILE} variable (default @file{~/.bash_history}).
+The file named by the value of @env{HISTFILE} is truncated, if
+necessary, to contain no more than the number of lines specified by
+the value of the @env{HISTFILESIZE} variable.
+When an interactive shell exits, the last
+@env{$HISTSIZE} lines are copied from the history list to the file
+named by @env{$HISTFILE}.
+If the @code{histappend} shell option is set (@pxref{Bash Builtins}),
+the lines are appended to the history file,
+otherwise the history file is overwritten.
+If @env{HISTFILE}
+is unset, or if the history file is unwritable, the history is not saved.
+After saving the history, the history file is truncated
+to contain no more than @env{$HISTFILESIZE} lines.
+If @env{HISTFILESIZE} is not set, or set to a null or non-numeric value,
+the history file is not truncated.
+
+If the @env{HISTTIMEFORMAT} is set, the time stamp information
+associated with each history entry is written to the history file,
+marked with the history comment character.
+When the history file is read, lines beginning with the history
+comment character followed immediately by a digit are interpreted
+as timestamps for the previous history line.
+
+The builtin command @code{fc} may be used to list or edit and re-execute
+a portion of the history list.
+The @code{history} builtin may be used to display or modify the history
+list and manipulate the history file.
+When using command-line editing, search commands
+are available in each editing mode that provide access to the
+history list (@pxref{Commands For History}).
+
+The shell allows control over which commands are saved on the history
+list.  The @env{HISTCONTROL} and @env{HISTIGNORE}
+variables may be set to cause the shell to save only a subset of the
+commands entered.
+The @code{cmdhist}
+shell option, if enabled, causes the shell to attempt to save each
+line of a multi-line command in the same history entry, adding
+semicolons where necessary to preserve syntactic correctness.
+The @code{lithist}
+shell option causes the shell to save the command with embedded newlines
+instead of semicolons.
+The @code{shopt} builtin is used to set these options.
+@xref{Bash Builtins}, for a description of @code{shopt}.
+
+@node Bash History Builtins
+@section Bash History Builtins
+@cindex history builtins
+
+Bash provides two builtin commands which manipulate the
+history list and history file.
+
+@table @code
+
+@item fc
+@btindex fc
+@example
+@code{fc [-e @var{ename}] [-lnr] [@var{first}] [@var{last}]}
+@code{fc -s [@var{pat}=@var{rep}] [@var{command}]}
+@end example
+
+The first form selects a range of commands from @var{first} to
+@var{last} from the history list and displays or edits and re-executes
+them.
+Both @var{first} and
+@var{last} may be specified as a string (to locate the most recent
+command beginning with that string) or as a number (an index into the
+history list, where a negative number is used as an offset from the
+current command number).  If @var{last} is not specified it is set to
+@var{first}.  If @var{first} is not specified it is set to the previous
+command for editing and @minus{}16 for listing.  If the @option{-l} flag is
+given, the commands are listed on standard output.  The @option{-n} flag
+suppresses the command numbers when listing.  The @option{-r} flag
+reverses the order of the listing.  Otherwise, the editor given by
+@var{ename} is invoked on a file containing those commands.  If
+@var{ename} is not given, the value of the following variable expansion
+is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}.  This says to use the
+value of the @env{FCEDIT} variable if set, or the value of the
+@env{EDITOR} variable if that is set, or @code{vi} if neither is set.
+When editing is complete, the edited commands are echoed and executed.
+
+In the second form, @var{command} is re-executed after each instance
+of @var{pat} in the selected command is replaced by @var{rep}.
+@var{command} is intepreted the same as @var{first} above.
+
+A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so
+that typing @samp{r cc} runs the last command beginning with @code{cc}
+and typing @samp{r} re-executes the last command (@pxref{Aliases}).
+
+@item history
+@btindex history
+@example
+history [@var{n}]
+history -c
+history -d @var{offset}
+history [-anrw] [@var{filename}]
+history -ps @var{arg}
+@end example
+
+With no options, display the history list with line numbers.
+Lines prefixed with a @samp{*} have been modified.
+An argument of @var{n} lists only the last @var{n} lines.
+If the shell variable @env{HISTTIMEFORMAT} is set and not null,
+it is used as a format string for @var{strftime} to display
+the time stamp associated with each displayed history entry.
+No intervening blank is printed between the formatted time stamp
+and the history line.
+
+Options, if supplied, have the following meanings:
+
+@table @code
+@item -c
+Clear the history list.  This may be combined
+with the other options to replace the history list completely.
+
+@item -d @var{offset}
+Delete the history entry at position @var{offset}.
+@var{offset} should be specified as it appears when the history is
+displayed.
+
+@item -a
+Append the new
+history lines (history lines entered since the beginning of the
+current Bash session) to the history file.
+
+@item -n
+Append the history lines not already read from the history file
+to the current history list.  These are lines appended to the history
+file since the beginning of the current Bash session.
+
+@item -r
+Read the history file and append its contents to
+the history list.
+
+@item -w
+Write out the current history list to the history file.
+
+@item -p
+Perform history substitution on the @var{arg}s and display the result
+on the standard output, without storing the results in the history list.
+
+@item -s
+The @var{arg}s are added to the end of
+the history list as a single entry.
+
+@end table
+
+When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is
+used, if @var{filename}
+is given, then it is used as the history file.  If not, then
+the value of the @env{HISTFILE} variable is used.
+
+@end table
+@end ifset
+
+@node History Interaction
+@section History Expansion
+@cindex history expansion
+
+The History library provides a history expansion feature that is similar
+to the history expansion provided by @code{csh}.  This section
+describes the syntax used to manipulate the history information.
+
+History expansions introduce words from the history list into
+the input stream, making it easy to repeat commands, insert the
+arguments to a previous command into the current input line, or
+fix errors in previous commands quickly.
+
+History expansion takes place in two parts.  The first is to determine
+which line from the history list should be used during substitution.
+The second is to select portions of that line for inclusion into the
+current one.  The line selected from the history is called the
+@dfn{event}, and the portions of that line that are acted upon are
+called @dfn{words}.  Various @dfn{modifiers} are available to manipulate
+the selected words.  The line is broken into words in the same fashion
+that Bash does, so that several words
+surrounded by quotes are considered one word.
+History expansions are introduced by the appearance of the
+history expansion character, which is @samp{!} by default.
+@ifset BashFeatures
+Only @samp{\} and @samp{'} may be used to escape the history expansion
+character.
+@end ifset
+
+@ifset BashFeatures
+Several shell options settable with the @code{shopt}
+builtin (@pxref{Bash Builtins}) may be used to tailor
+the behavior of history expansion.  If the
+@code{histverify} shell option is enabled, and Readline
+is being used, history substitutions are not immediately passed to
+the shell parser.
+Instead, the expanded line is reloaded into the Readline
+editing buffer for further modification.
+If Readline is being used, and the @code{histreedit}
+shell option is enabled, a failed history expansion will be
+reloaded into the Readline editing buffer for correction.
+The @option{-p} option to the @code{history} builtin command
+may be used to see what a history expansion will do before using it.
+The @option{-s} option to the @code{history} builtin may be used to
+add commands to the end of the history list without actually executing
+them, so that they are available for subsequent recall.
+This is most useful in conjunction with Readline.
+
+The shell allows control of the various characters used by the
+history expansion mechanism with the @code{histchars} variable,
+as explained above (@pxref{Bash Variables}).  The shell uses
+the history comment character to mark history timestamps when
+writing the history file.
+@end ifset
+
+@menu
+* Event Designators::  How to specify which history line to use.
+* Word Designators::   Specifying which words are of interest.
+* Modifiers::          Modifying the results of substitution.
+@end menu
+
+@node Event Designators
+@subsection Event Designators
+@cindex event designators
+
+An event designator is a reference to a command line entry in the
+history list.
+Unless the reference is absolute, events are relative to the current
+position in the history list.
+@cindex history events
+
+@table @asis
+
+@item @code{!}
+@ifset BashFeatures
+Start a history substitution, except when followed by a space, tab,
+the end of the line, @samp{=} or @samp{(} (when the
+@code{extglob} shell option is enabled using the @code{shopt} builtin).
+@end ifset
+@ifclear BashFeatures
+Start a history substitution, except when followed by a space, tab,
+the end of the line, or @samp{=}.
+@end ifclear
+
+@item @code{!@var{n}}
+Refer to command line @var{n}.
+
+@item @code{!-@var{n}}
+Refer to the command @var{n} lines back.
+
+@item @code{!!}
+Refer to the previous command.  This is a synonym for @samp{!-1}.
+
+@item @code{!@var{string}}
+Refer to the most recent command
+preceding the current position in the history list
+starting with @var{string}.
+
+@item @code{!?@var{string}[?]}
+Refer to the most recent command
+preceding the current position in the history list
+containing @var{string}.
+The trailing
+@samp{?} may be omitted if the @var{string} is followed immediately by
+a newline.
+
+@item @code{^@var{string1}^@var{string2}^}
+Quick Substitution.  Repeat the last command, replacing @var{string1}
+with @var{string2}.  Equivalent to
+@code{!!:s/@var{string1}/@var{string2}/}.
+
+@item @code{!#}
+The entire command line typed so far.
+
+@end table
+
+@node Word Designators
+@subsection Word Designators
+
+Word designators are used to select desired words from the event.
+A @samp{:} separates the event specification from the word designator.  It
+may be omitted if the word designator begins with a @samp{^}, @samp{$},
+@samp{*}, @samp{-}, or @samp{%}.  Words are numbered from the beginning
+of the line, with the first word being denoted by 0 (zero).  Words are
+inserted into the current line separated by single spaces.
+
+@need 0.75
+For example,
+
+@table @code
+@item !!
+designates the preceding command.  When you type this, the preceding
+command is repeated in toto.
+
+@item !!:$
+designates the last argument of the preceding command.  This may be
+shortened to @code{!$}.
+
+@item !fi:2
+designates the second argument of the most recent command starting with
+the letters @code{fi}.
+@end table
+
+@need 0.75
+Here are the word designators:
+@table @code
+
+@item 0 (zero)
+The @code{0}th word.  For many applications, this is the command word.
+
+@item @var{n}
+The @var{n}th word.
+
+@item ^
+The first argument; that is, word 1.
+
+@item $
+The last argument.
+
+@item %
+The word matched by the most recent @samp{?@var{string}?} search.
+
+@item @var{x}-@var{y}
+A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}.
+
+@item *
+All of the words, except the @code{0}th.  This is a synonym for @samp{1-$}.
+It is not an error to use @samp{*} if there is just one word in the event;
+the empty string is returned in that case.
+
+@item @var{x}*
+Abbreviates @samp{@var{x}-$}
+
+@item @var{x}-
+Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word.
+
+@end table
+
+If a word designator is supplied without an event specification, the
+previous command is used as the event.
+
+@node Modifiers
+@subsection Modifiers
+
+After the optional word designator, you can add a sequence of one or more
+of the following modifiers, each preceded by a @samp{:}.
+
+@table @code
+
+@item h
+Remove a trailing pathname component, leaving only the head.
+
+@item t
+Remove all leading pathname components, leaving the tail.
+
+@item r
+Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving
+the basename.
+
+@item e
+Remove all but the trailing suffix.
+
+@item p
+Print the new command but do not execute it.
+
+@ifset BashFeatures
+@item q
+Quote the substituted words, escaping further substitutions.
+
+@item x
+Quote the substituted words as with @samp{q},
+but break into words at spaces, tabs, and newlines.
+@end ifset
+
+@item s/@var{old}/@var{new}/
+Substitute @var{new} for the first occurrence of @var{old} in the
+event line.  Any delimiter may be used in place of @samp{/}.
+The delimiter may be quoted in @var{old} and @var{new}
+with a single backslash.  If @samp{&} appears in @var{new},
+it is replaced by @var{old}.  A single backslash will quote
+the @samp{&}.  The final delimiter is optional if it is the last
+character on the input line.
+
+@item &
+Repeat the previous substitution.
+
+@item g
+@itemx a
+Cause changes to be applied over the entire event line.  Used in
+conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/},
+or with @samp{&}.
+
+@item G
+Apply the following @samp{s} modifier once to each word in the event.
+
+@end table
index 3efcf32d68e9722024b6ca9d67f9e81b2aa5ac04..72ec06a2c1fd8dde92acea5e8ac773e35f1d061b 100755 (executable)
@@ -1,4 +1,4 @@
-BUILD_DIR=/usr/local/build/chet/bash/bash-current
+BUILD_DIR=/usr/local/build/bash/bash-current
 THIS_SH=$BUILD_DIR/bash
 PATH=$PATH:$BUILD_DIR
 
index 056892d4106077d9df3db37289fb05c03606d4a2..a1250fbcecccece9f1cf06170bdfd141e989f18f 100644 (file)
@@ -351,6 +351,8 @@ version[agent] foo[bar]
 version.agent bowl
 foobar] foo foo[bar]
 bleh bbb bleh
+ab]
+bar
 1
 1
 1
index 87cf011520bfd01743eff5fb5a3c6443fa5dc3b7..c4f8cad4338392a9d9d6f3420e4c8787ef19dca2 100644 (file)
@@ -27,3 +27,9 @@ array2["foo"]=bbb
 
 echo ${!array2[@]}
 echo ${array2[@]}
+
+declare -A foo
+foo=( ['ab]']=bar )
+
+echo ${!foo[@]}
+echo ${foo[@]}
diff --git a/tests/cond-regexp1.sub b/tests/cond-regexp1.sub
new file mode 100644 (file)
index 0000000..dd287cb
--- /dev/null
@@ -0,0 +1,56 @@
+VAR='[[:alpha:]]'
+
+[[ $VAR =~ '[[:alpha:]]' ]] && echo match 1
+
+[[ a =~ '[[:alpha:]]' ]] || echo match 2
+
+[[ a =~ [[:alpha:]] ]] && echo match 3
+
+[[ a =~ $VAR ]] && echo match 4
+
+[[ a =~ "$VAR" ]] || echo match 5
+
+line=aab
+[[ $line =~ [[:space:]]*(a)?b ]] && echo match 6
+
+V="alphabet"
+[[ $V == alphabet ]] && echo yes 1
+[[ $V == "alphabet" ]] && echo yes 2
+[[ $V == 'alphabet' ]] && echo yes 3
+[[ $V =~ alphabet ]] && echo yes 4
+[[ $V =~ "alphabet" ]] && echo yes 5
+[[ $V =~ 'alphabet' ]] && echo yes 6
+
+DOG="Dog name - 01 - Wiggles"
+REPAT='([[:alpha:][:blank:]]*)- ([[:digit:]]*) - (.*)$'
+if [[ $DOG =~ ([[:alpha:][:blank:]]*)-\ ([[:digit:]]*)\ -\ (.*)$ ]]
+then
+   echo Dog ${BASH_REMATCH[2]} is ${BASH_REMATCH[3]}
+fi
+if [[ $DOG =~ $REPAT ]]
+then
+   echo Dog ${BASH_REMATCH[2]} is ${BASH_REMATCH[3]}
+fi
+
+[[ $REPAT =~ "$REPAT" ]] && echo rematch 1
+
+v="one two buckle my shoe"
+[[ ${v} =~ "one two" ]] && echo matches 7
+
+[[ ${v} =~ (one two) ]] && echo matches 8
+
+[[ ${v} =~ one\ two ]] && echo matches 9
+
+unset pattern string
+pattern="xxx.yyy"
+string=xxxAyyy
+
+[[ $string =~ $pattern ]] && echo unquoted matches
+[[ $string =~ "$pattern" ]] && echo quoted matches
+
+# problems in pre-patched bash-4.2
+[[ "hello\ 1world" =~ llo\ 1 ]] && echo match control-a 1
+[[ "hello\ 1world" =~ \ 1world ]] && echo match control-a 2
+[[ "hello\ 1world" =~ \ 1world$ ]] && echo match control-a 3
+[[ "hello\ 1world" =~ \ 1 ]] && echo match control-a 4
+[[ "hello\ 1world" =~ o\ 1world$ ]] && echo match control-a 5
diff --git a/tests/cond-regexp2.sub b/tests/cond-regexp2.sub
new file mode 100644 (file)
index 0000000..71abfb7
--- /dev/null
@@ -0,0 +1,30 @@
+[[ "\\" =~ ["."] ]] && echo bad 1
+
+[[ "\\" =~ "[.]" ]] && echo bad 2
+
+[[ "\\" =~ [\. ]] && echo bad 3
+
+[[ "\\" =~ [\.] ]] && echo bad 4
+
+[[ "\\" =~ [\\] ]] || echo bad 5
+
+[[ dog =~ [[=d=]].. ]] && echo ok 1
+[[ d.. =~ [[=d=]]\.\. ]] && echo ok 2
+[[ dog =~ ['[=d=]'].. ]] && echo ok 3  # dubious
+
+[[ dog =~ [[=d=]].[[=G=][=g=]] ]] && echo ok 4
+[[ dog =~ [[=d=]].[\[=G=][=g=]] ]] && echo ok 4a
+
+[[ dog =~ "d.." ]] || echo ok 5
+
+[[ dog =~ [[.d.][.D.]]o. ]] && echo ok 6
+
+[[ dog =~ ([[.d.][.D.]])o(.) ]] && echo ok 7 -- ${BASH_REMATCH[1]}
+[[ dog =~ d([[.o.][.O.]])(.) ]] && echo ok 8 -- ${BASH_REMATCH[1]}
+[[ dog =~ .([[.o.][.O.]])(.) ]] && echo ok 9
+
+[[ dog =~ 'd''o''g' ]] && echo ok 10
+
+[[ ']' =~ [']'] ]] && echo ok 11
+
+[[ a =~ ['a]'] ]] || echo ok 12
index d50ed393845f8bf8ed91af6979b54b2ae53eccde..c7150e1b3ceaf7dda81215d9be0e1694d8fd7063 100644 (file)
@@ -59,8 +59,22 @@ rematch 1
 matches 7
 matches 8
 matches 9
+unquoted matches
 match control-a 1
 match control-a 2
 match control-a 3
 match control-a 4
 match control-a 5
+ok 1
+ok 2
+ok 3
+ok 4
+ok 4a
+ok 5
+ok 6
+ok 7 -- d
+ok 8 -- o
+ok 9
+ok 10
+ok 11
+ok 12
index b053e48221abc714260751cff619895228a17e6c..0c0964963618a1f8b5d1b2471d52aa88c5ad746d 100755 (executable)
@@ -180,4 +180,6 @@ echo ${BASH_REMATCH[@]}
 if [[ "123abc" == *?(a)bc ]]; then echo ok 42; else echo bad 42; fi
 if [[ "123abc" == *?(a)bc ]]; then echo ok 43; else echo bad 43; fi
 
-${THIS_SH} ./cond-regexp.sub
+${THIS_SH} ./cond-regexp1.sub
+
+${THIS_SH} ./cond-regexp2.sub
index 652d6ce47c35a452d7f41d26069b18f01f403719..d96db333239a591326cb514fc2a82b2adab1c18c 100644 (file)
@@ -535,11 +535,6 @@ initialize_shell_variables (env, privmode)
 
       set_if_not ("HISTFILE", name);
       free (name);
-
-#if 0
-      set_if_not ("HISTSIZE", "500");
-      sv_histsize ("HISTSIZE");
-#endif
     }
 #endif /* HISTORY */
 
@@ -4487,14 +4482,16 @@ sv_histsize (name)
       if (legal_number (temp, &num))
        {
          hmax = num;
-         if (name[4] == 'S')
+         if (hmax < 0 && name[4] == 'S')
+           unstifle_history ();        /* unstifle history if HISTSIZE < 0 */
+         else if (name[4] == 'S')
            {
              stifle_history (hmax);
              hmax = where_history ();
              if (history_lines_this_session > hmax)
                history_lines_this_session = hmax;
            }
-         else
+         else if (hmax >= 0)   /* truncate HISTFILE if HISTFILESIZE >= 0 */
            {
              history_truncate_file (get_string_value ("HISTFILE"), hmax);
              if (hmax <= history_lines_in_file)
index 85f7bb4f2061343bc0789a9489310d1c6362fc4f..fca784456bbaa268ef87dd26209efe0d4e95b366 100644 (file)
@@ -535,11 +535,6 @@ initialize_shell_variables (env, privmode)
 
       set_if_not ("HISTFILE", name);
       free (name);
-
-#if 0
-      set_if_not ("HISTSIZE", "500");
-      sv_histsize ("HISTSIZE");
-#endif
     }
 #endif /* HISTORY */
 
@@ -4071,7 +4066,7 @@ push_dollar_vars ()
     {
       dollar_arg_stack = (WORD_LIST **)
        xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10)
-                 * sizeof (WORD_LIST **));
+                 * sizeof (WORD_LIST *));
     }
   dollar_arg_stack[dollar_arg_stack_index++] = list_rest_of_args ();
   dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;